Skip to content

Instantly share code, notes, and snippets.

View EclipseGc's full-sized avatar

Kris Vanderwater EclipseGc

View GitHub Profile
diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php
index 2d79d6f..36314a3 100644
--- a/core/lib/Drupal/Core/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Core/Plugin/Context/Context.php
@@ -51,6 +51,13 @@ public function setContextValue($value) {
parent::setContextValue($value);
}
+ /**
+ * @return DataDefinitionInterface
diff --git a/block_page.services.yml b/block_page.services.yml
index 8df43da..da46708 100644
--- a/block_page.services.yml
+++ b/block_page.services.yml
@@ -12,3 +12,6 @@ services:
plugin.manager.page_variant:
class: Drupal\block_page\Plugin\PageVariantManager
parent: default_plugin_manager
+ context.handler:
+ class: Drupal\block_page\ContextHandler
<?php
/**
* @file
* Contains \Drupal\block_page\ContextHandler.php.
*/
namespace Drupal\block_page;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\TypedData\DataDefinitionInterface;
<?php
/**
* @file
* Contains \Drupal\display\DisplayHtmlFragmentRenderer
*/
namespace Drupal\display;
use Drupal\Core\Language\Language;
<?php
class MySubscriber implements EventSubscriberInterface {
public function __construct(EntityManager $entity_manager, LinkRelationshipManagerInterface $manager) {
$this->entity_manager = $entity_manager;
$this->manager = $manager;
}
public static function getSubscribedEvents() {
return array(
{
"id": "bartik_search",
"weight": -1,
"status": true,
"uuid": "c949461b-e7b6-4217-b55c-923e1e90b5ad",
"langcode": "en",
"dependencies": {
"module": [
"search"
],
diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/.EntityResource.php.swp b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/.EntityResource.php.swp
deleted file mode 100644
index efbc9bd..0000000
Binary files a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/.EntityResource.php.swp and /dev/null differ
diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php
index 9b3c792..f373371 100644
--- a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php
@@ -9,6 +9,7 @@
@EclipseGc
EclipseGc / RestResourceDerivativeDecorator.php
Created April 22, 2014 18:53
RestResourceDerivativeDecorator
<?php
class RestResourceDerivativeDecorator extends DerivativeDiscoveryDecorator {
public function __construct(DiscoveryInterface $decorated, RouteCollection $collection) {
parent::__construct($decorated);
$this->collection = $collection;
}
protected function getDerivativeFetcher($base_plugin_id, $base_definition) {
projects[my_profile][type] = profile
projects[my_profile][download][type] = git
projects[my_profile][download][url] = file:///ht_docs/projects/profile/my_profile/.git
projects[my_profile][download][branch] = master
<?php
/**
* @file
* Contains \Drupal\Core\Database\Query\PlaceholderTrait.
*/
namespace Drupal\Core\Database\Query;
/**
* @see \Drupal\Core\Database\Query\PlaceholderInterface