Skip to content

Instantly share code, notes, and snippets.

View EclipseGc's full-sized avatar

Kris Vanderwater EclipseGc

View GitHub Profile
<?php
namespace Drupal\lightning_layout;
use Drupal\Core\Entity\Entity\EntityViewDisplay;
class PanelizerAwareEntityViewDisplay extends EntityViewDisplay {
protected function ensurePanelizerFieldStorage() {
$storage = $this->entityTypeManager()->getStorage('field_storage_config');
foo_route:
pattern: '/some/random/{entity_type}/{entity}/route'
options:
parameters:
entity:
type: entity:{entity_type}
@EclipseGc
EclipseGc / gist:5920201
Last active December 19, 2015 07:39 — forked from sdboyer/gist:5920080
<?php
/**
* @Page(
* id = "my_page",
* title = @Translation("My page")
* routes = {
* @Route("/another/page/{foo}")
* @Route("/my/page/{foo}", "SomeOtherClass::access")
* }
<?php
/**
* @Page(
* id = "my_page",
* title = @Translation("My page")
* routes = {
* @Route("/another/page/{foo}")
* @Route("/my/page/{foo}", "SomeOtherClass::access")
* }
<?php
/**
* @file
* Contains \Drupal\Core\Config\TypedConfigManager.
*/
namespace Drupal\Core\Config;
use Drupal\Component\Plugin\PluginManagerBase;
@EclipseGc
EclipseGc / gist:5853734
Last active December 18, 2015 22:19 — forked from anonymous/gist:5853729
node_page_edit:
pattern: '/music/{album}/{artist}'
defaults:
_content: 'Drupal\music\MusicController::view'
requirements:
_permission: 'yeap'
options:
converter:
album: 'paramconverter.typed_data'
artist: 'paramconverter.typed_data'
id: frontend
label: Frontend master display
layout: static_layout:layout__core
layoutSettings: { }
staticContexts:
urlgoober:
type: string
value: path/to/node
derivedContexts:
node_author:
id: frontend
label: Frontend master display
layout: static_layout:layout__core
layoutSettings: { }
blockInfo:
context:
url:
type: static
address: poobah
node_2: