This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class AssetLibraryRepository { | |
| protected function initialize() { | |
| if ($this->initialized) { | |
| return; | |
| } | |
| $this->initialized = TRUE; | |
| $library_collector = new AssetLibraryCollector($this); | |
| foreach ($this->moduleHandler->getImplementations('library_info') as $module) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class PageContentAccessChecker implements AccessCheckInterface { | |
| public function applies(Route $route) { | |
| return array_key_exists('_page_content_access_method', $route->getRequirements()); | |
| } | |
| public function access(Route $route, Request $request) { | |
| $content_controller = $request->attributes->get('_content_object'); | |
| return $content_controller->access(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @Page( | |
| * id = "my_page", | |
| * title = @Translation("My page") | |
| * routes = { | |
| * @Route("/another/page/{foo}") | |
| * @Route("/my/page/{foo}", "SomeOtherClass::access") | |
| * } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Gliph; | |
| class DirectedAdjacencyGraph { | |
| protected $vertices; | |
| protected $vertexTypes; | |
| public function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $refl = new \ReflectionClass($object); | |
| foreach ($refl->getProperties() as $prop) { | |
| if (!$prop->isPublic()) { | |
| $prop->setAccessible(TRUE); | |
| } | |
| $this->props[$prop->getName()] = $prop->getValue($object); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\Asset\AssetGraph. | |
| */ | |
| namespace Drupal\Core\Asset; | |
| use Gliph\Graph\DirectedAdjacencyGraph; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * Contains Drupal\Core\Asset\AssetCollector. | |
| */ | |
| namespace Drupal\Core\Asset\Factory; | |
| use Drupal\Core\Asset\AssetInterface; | |
| use Drupal\Core\Asset\Bag\AssetBagInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Gliph\Graph\DirectedAdjacencyList; | |
| use Gliph\Exception\InvalidVertexTypeException; | |
| use Drupal\Something\ExtensionInterface; | |
| class ExtensionGraph extends DirectedAdjacencyList { | |
| protected $extensionCollection; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ExtensionFinder { | |
| protected $factory; | |
| const MODULE = 0x1; | |
| const THEME = 0x2; | |
| const PROFILE = 0x4; | |
| public function __construct(ExtensionFactory $factory) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use \Gliph\Graph\DirectedAdjacencyList; | |
| use \Gliph\Traversal\DepthFirst; | |
| $graph = new DirectedAdjacencyList(); | |
| foreach ($entity_list as $entity) { | |
| if ($entity->has('embedded')) { | |
| foreach ($entity->get('embedded') as $embedded) { |