Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
/**
* Returns the plugin category that this display requires.
*
* This can be used for filtering views plugins. E.g. If a plugin category of
* 'foo' is specified, only plugins with no 'types' declared or 'types'
* containing 'foo'. If you have a type of bar, this plugin will not be used.
* This is applicable for style, row, access, cache, and exposed_form plugins.
*
* @return string
* The required category type. Defaults to 'normal'.
<?php
/**
* @file
* Contains \Drupal\Core\Entity\EntityIterator.
*/
namespace Drupal\Core\Entity;
/**
<?php
/**
* @file
* Contains \Drupal\views\ViewResult.
*/
namespace Drupal\views;
/**
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 8d6e28c..db55db8 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -7,9 +7,9 @@
namespace Drupal\Core;
+use Drupal\Component\Utility\Settings;
use Drupal\Component\PhpStorage\PhpStorageFactory;
<?php
/**
* @file
* Contains \Drupal\comment\CommentBreadcrumbBuilder.
*/
namespace Drupal\comment;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderBase;
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.
+ *
#!/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/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);
<?php
/**
* @file
* Contains \Drupal\Core\Entity\EntityType.
*/
namespace Drupal\Core\Entity;
use Drupal\Component\Utility\Unicode;