Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
diff --git a/docroot/sites/all/modules/custom/cci_cloud/cci_cloud.install b/docroot/sites/all/modules/custom/cci_cloud/cci_cloud.install
index 6e25d2b..6d065db 100644
--- a/docroot/sites/all/modules/custom/cci_cloud/cci_cloud.install
+++ b/docroot/sites/all/modules/custom/cci_cloud/cci_cloud.install
@@ -85,6 +85,7 @@ function cci_cloud_schema() {
'data' => array(
'description' => 'Any additional data required',
'type' => 'blob',
+ 'serialize' => TRUE,
),
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php
index 001e278..a795e0e 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandler.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -759,6 +759,9 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
watchdog('system', '%module module uninstalled.', array('%module' => $module), WATCHDOG_INFO);
$schema_store->delete($module);
+
+ // Make sure any route data is also removed for this module.
diff --git a/core/lib/Drupal/Core/Cache/CacheCollector.php b/core/lib/Drupal/Core/Cache/CacheCollector.php
index 5971cf1..0d0e25e 100644
--- a/core/lib/Drupal/Core/Cache/CacheCollector.php
+++ b/core/lib/Drupal/Core/Cache/CacheCollector.php
@@ -155,7 +155,7 @@ public function set($key, $value) {
$this->storage[$key] = $value;
// The key might have been marked for deletion.
unset($this->keysToRemove[$key]);
- $this->invalidateCache();
+ $this->deleteCache();
diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php
index 1d86e02..2ada67b 100644
--- a/core/lib/Drupal/Core/Entity/EntityType.php
+++ b/core/lib/Drupal/Core/Entity/EntityType.php
@@ -205,23 +205,21 @@ class EntityType implements EntityTypeInterface {
* An array of values from the annotation.
*/
public function __construct($definition) {
- foreach ($definition as $property => $value) {
- $this->{$property} = $value;
<?php
/**
* @file
* Contains \Drupal\Core\Entity\EntityType.
*/
namespace Drupal\Core\Entity;
use Drupal\Component\Utility\Unicode;
diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php
index 76a826b..dd894a4 100644
--- a/core/lib/Drupal/Core/Routing/RouteBuilder.php
+++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php
@@ -119,8 +119,13 @@ public function rebuild() {
foreach ($routes['route_callbacks'] as $route_callback) {
$callback = $this->controllerResolver->getControllerFromDefinition($route_callback);
if ($callback_routes = call_user_func($callback)) {
- foreach ($callback_routes as $name => $callback_route) {
- $collection->add($name, $callback_route);
#!/usr/bin/env php
<?php
/**
* @file
* Command line token calculator for rebuild.php.
*/
require_once __DIR__ . '/../vendor/autoload.php';
#!/usr/bin/env php
<?php
/**
* @file
* Command line token calculator for rebuild.php.
*/
require_once __DIR__ . '/../vendor/autoload.php';
diff --git a/core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php b/core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php
index 1fae4c6..cff4c54 100644
--- a/core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php
+++ b/core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php
@@ -13,14 +13,26 @@
interface BreadcrumbBuilderInterface {
/**
+ * Whether this breadcrumb builder should be used to build the breadcrumb.
+ *
<?php
/**
* @file
* Contains \Drupal\comment\CommentBreadcrumbBuilder.
*/
namespace Drupal\comment;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderBase;