class CheeseburgerMenu in Cheeseburger Menu 8.4
Same name and namespace in other branches
- 8 src/Plugin/Block/CheeseburgerMenu.php \Drupal\cheeseburger_menu\Plugin\Block\CheeseburgerMenu
- 8.2 src/Plugin/Block/CheeseburgerMenu.php \Drupal\cheeseburger_menu\Plugin\Block\CheeseburgerMenu
- 8.3 src/Plugin/Block/CheeseburgerMenu.php \Drupal\cheeseburger_menu\Plugin\Block\CheeseburgerMenu
Block info.
Plugin annotation
@Block(
id = "cheesebuger_menu_block",
admin_label = @Translation("Cheeseburger Menu"),
category = @Translation("Block"),
description = @Translation("Provide cheesebugermenu block")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Component\Plugin\ContextAwarePluginBase implements ContextAwarePluginInterface
- class \Drupal\Core\Plugin\ContextAwarePluginBase implements CacheableDependencyInterface, ContextAwarePluginInterface uses DependencySerializationTrait, StringTranslationTrait, TypedDataTrait
- class \Drupal\Core\Block\BlockBase implements BlockPluginInterface, PluginWithFormsInterface, PreviewFallbackInterface uses BlockPluginTrait, ContextAwarePluginAssignmentTrait
- class \Drupal\cheeseburger_menu\Plugin\Block\CheeseburgerMenu implements ContainerFactoryPluginInterface
- class \Drupal\Core\Block\BlockBase implements BlockPluginInterface, PluginWithFormsInterface, PreviewFallbackInterface uses BlockPluginTrait, ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Plugin\ContextAwarePluginBase implements CacheableDependencyInterface, ContextAwarePluginInterface uses DependencySerializationTrait, StringTranslationTrait, TypedDataTrait
- class \Drupal\Component\Plugin\ContextAwarePluginBase implements ContextAwarePluginInterface
Expanded class hierarchy of CheeseburgerMenu
File
- src/
Plugin/ Block/ CheeseburgerMenu.php, line 37 - Cheeseburger class extends BlockBase.
Namespace
Drupal\cheeseburger_menu\Plugin\BlockView source
class CheeseburgerMenu extends BlockBase implements ContainerFactoryPluginInterface {
/**
* The entity field manager.
*
* @var \Drupal\Core\Entity\EntityFieldManager
*/
protected $entityFieldManager;
/**
* The module handler.
*
* @var \Drupal\Core\Extension\ModuleHandler
*/
protected $moduleHandler;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManager
*/
protected $entityTypeManager;
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManager
*/
protected $languageManager;
/**
* The route match interface.
*
* @var \Drupal\Core\Routing\RouteMatchInterface
*/
protected $routeMatch;
/**
* The renderer.
*
* @var \Drupal\Core\Render\Renderer
*/
protected $renderer;
/**
* The menu link tree.
*
* @var \Drupal\Core\Menu\MenuLinkTree
*/
protected $menuTree;
/**
* The theme handler.
*
* @var \Drupal\Core\Extension\ThemeHandler
*/
protected $themeHandler;
/**
* The breakpoint manager.
*
* @var \Drupal\breakpoint\BreakpointManager
*/
protected $breakPointManager;
/**
* Cheesebuger menu serice.
*
* @var \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock
*/
protected $renderCheesebugerMenuService;
/**
* Database service.
*
* @var \Drupal\Core\Database\Connection
*/
protected $database;
/**
* CheeseburgerMenu constructor.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager, ModuleHandler $moduleHandler, LanguageManager $languageManager, RouteMatchInterface $route_match, Renderer $renderer, MenuLinkTree $menuLinkTree, ThemeHandler $themeHandler, BreakpointManager $breakpointManager, RenderCheeseburgerMenuBlock $renderCheeseburgerMenuBlock, Connection $connection) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityFieldManager = $entity_field_manager;
$this->entityTypeManager = $entity_type_manager;
$this->moduleHandler = $moduleHandler;
$this->languageManager = $languageManager;
$this->routeMatch = $route_match;
$this->renderer = $renderer;
$this->menuTree = $menuLinkTree;
$this->themeHandler = $themeHandler;
$this->breakPointManager = $breakpointManager;
$this->renderCheesebugerMenuService = $renderCheeseburgerMenuBlock;
$this->database = $connection;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('entity_field.manager'), $container
->get('entity_type.manager'), $container
->get('module_handler'), $container
->get('language_manager'), $container
->get('current_route_match'), $container
->get('renderer'), $container
->get('menu.link_tree'), $container
->get('theme_handler'), $container
->get('breakpoint.manager'), $container
->get('render_cheeseburger_menu_lock.service'), $container
->get('database'));
}
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'depth' => 0,
'css_default' => FALSE,
'show_navigation' => TRUE,
'header_height' => FALSE,
'hidden_by_default' => FALSE,
'menu' => [],
'taxonomy_vocabulary' => [],
'phone' => [
'show' => 0,
'menu_weight' => '0',
'store' => '0',
'manual_title' => '',
],
'lang_switcher' => [
'show' => FALSE,
'menu_weight' => 0,
],
'cart' => [
'show' => 0,
'menu_weight' => '0',
],
'breakpoints' => [
'all' => TRUE,
],
'active_state_enable' => 0,
'parent_menu_as_link' => FALSE,
] + parent::defaultConfiguration();
}
/**
* Block form.
*/
public function blockForm($form, FormStateInterface $form_state) {
$config = $this
->getConfiguration();
$menu_names = $this->renderCheesebugerMenuService
->getAllMenuLinkNames();
$taxonomy_term_names = $this->renderCheesebugerMenuService
->getAllTaxonomyTermNames();
// DEPTH.
$form['depth'] = [
'#title' => $this
->t('Maximum menu depth. Use 0 for no limit.'),
'#type' => 'number',
'#default_value' => (int) $config['depth'],
];
// CSS DEFAULT.
$form['css_default'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Use default css'),
'#default_value' => (int) $config['css_default'],
];
// SHOW NAVIGATION.
$form['show_navigation'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Show navigation'),
'#default_value' => (int) $config['show_navigation'],
];
$form['hidden_by_default'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Hidden by default'),
'#default_value' => (int) $config['hidden_by_default'],
];
// ACTIVE STATE ENABLE.
$form['active_state_enable'] = [
'#title' => $this
->t('Active state enable'),
'#type' => 'checkbox',
'#default_value' => (int) $config['active_state_enable'],
'#description' => $this
->t('Cheeseburger menu will try to activate active menu item based on current route, in some cases Cheeseburger is not able to do so. This feature needs to disable Drupal Caching system. In case this feature is not needed, disable this to speed up Cheeseburger menu.'),
];
// Parent menu link.
$form['parent_menu_as_link'] = [
'#title' => $this
->t('Enable link for parent menu item'),
'#type' => 'checkbox',
'#default_value' => (int) $config['parent_menu_as_link'],
];
// HEADER HEIGHT.
$form['header_height'] = [
'#title' => $this
->t('Site header height'),
'#type' => 'number',
'#default_value' => (int) $config['header_height'],
];
// LANGUAGE SWITCHER.
if ($this->languageManager
->isMultilingual()) {
$form += $this
->buildMenuItemFormElement('lang_switcher', $this
->t('Enable language switcher'));
}
if ($this->moduleHandler
->moduleExists('commerce_cart')) {
$form += $this
->buildMenuItemFormElement('cart', $this
->t('Cart'));
}
$form += $this
->buildMenuItemFormElement('phone', $this
->t('Phone'));
$options[0] = $this
->t('Manual');
if ($this->moduleHandler
->moduleExists('commerce_store')) {
$store_field_definitions = $this->entityFieldManager
->getFieldDefinitions('commerce_store', 'online');
if (array_key_exists('field_phone', $store_field_definitions)) {
$sql = $this->database
->query("SELECT store_id, name FROM commerce_store_field_data")
->fetchAll();
foreach ($sql as $stores) {
$options[$stores->store_id] = $stores->name;
}
}
}
$form['phone']['store'] = [
'#type' => 'select',
'#title' => $this
->t('Choose your store'),
'#options' => $options,
'#states' => [
'invisible' => [
':input[name="settings[phone][show]"]' => [
'checked' => FALSE,
],
],
],
'#default_value' => $config['phone']['store'],
];
$form['phone']['manual_title'] = [
'#title' => 'Phone number',
'#type' => 'textfield',
'#states' => [
'visible' => [
':input[name="settings[phone][store]"]' => [
'value' => 0,
],
':input[name="settings[phone][show]"]' => [
'checked' => TRUE,
],
],
],
'#default_value' => $config['phone']['manual_title'],
];
$form['phone']['description'] = [
'#markup' => '<div>' . $this
->t('To use phone from store, add field with machine name field_phone to your store type') . '</div>',
];
//unset($form['phone']);
// MENU.
$form['menu'] = $this
->buildConfigMenuForm($menu_names, 'menu', $this
->t('Menus'));
// TAXONOMY.
$form['taxonomy_vocabulary'] = $this
->buildConfigMenuForm($taxonomy_term_names, 'taxonomy_vocabulary', $this
->t('Vocabularies'));
$breakpoints = $this->renderCheesebugerMenuService
->returnBreakpointsForDefaultTheme();
$breakpoint_description = $this
->t('This module uses breakpoints from your default theme<br>If you want to change it, make your changes in default_theme_name.breakpoints.yml<br><br>');
if (!empty($breakpoints)) {
$form['breakpoints'] = [
'#type' => 'fieldset',
'#title' => 'Enable breakpoints',
];
$form['breakpoints']['all'] = [
'#type' => 'select',
'#options' => [
0 => 'Custom',
1 => 'All',
],
'#default_value' => (int) $config['breakpoints']['all'],
];
$options = [
'0' => '0px',
];
foreach ($breakpoints as $name => $breakpoint) {
if (strtolower($breakpoint['label']) != 'all' && strpos($breakpoint['mediaQuery'], ' 0px') === FALSE) {
$options[$name] = $breakpoint['label'];
$breakpoint_description .= $breakpoint['label'] . ': ' . $breakpoint['mediaQuery'] . '<br>';
}
}
$form['breakpoints']['from'] = [
'#prefix' => '<div class="container-inline">',
'#type' => 'select',
'#states' => [
'visible' => [
':input[name="settings[breakpoints][all]"]' => [
'value' => 0,
],
],
],
'#options' => $options,
'#title' => 'From',
'#default_value' => array_key_exists('breakpoints', $config) ? array_key_exists('from', $config['breakpoints']) ? $config['breakpoints']['from'] : '0' : '0',
];
$form['breakpoints']['to'] = [
'#type' => 'select',
'#suffix' => '</div>',
'#title' => 'To',
'#states' => [
'visible' => [
':input[name="settings[breakpoints][all]"]' => [
'value' => 0,
],
],
],
'#options' => $options,
'#default_value' => array_key_exists('breakpoints', $config) ? array_key_exists('to', $config['breakpoints']) ? $config['breakpoints']['to'] : '0' : '0',
];
if (!empty($breakpoint_description)) {
$form['breakpoints']['#description'] = $breakpoint_description;
}
}
return $form;
}
/**
* Returns default menu form element.
*/
public function buildMenuItemFormElement($machine_name, $label) {
$form[$machine_name]['show'] = [
'#type' => 'checkbox',
'#prefix' => '<div class="container-inline">',
'#title' => $label,
'#default_value' => (int) $this->configuration[$machine_name]['show'],
];
$form[$machine_name]['menu_weight'] = [
'#type' => 'weight',
'#default_value' => $this->configuration[$machine_name]['menu_weight'],
'#suffix' => '</div>',
'#states' => [
'invisible' => [
':input[name="settings[' . $machine_name . '][show]"]' => [
'checked' => FALSE,
],
],
],
];
return $form;
}
/**
* Builds menu table.
*/
public function buildConfigMenuForm($names, $machine_name, $caption) {
$header = [
'select' => '',
'menu' => $this
->t('Name'),
'menu_weight' => $this
->t('Weight'),
'title' => $this
->t('Title'),
'collapsible_title' => $this
->t('Collapsible title'),
'manual_title' => $this
->t('Manual title'),
];
$form_part = [
'#type' => 'table',
'#caption' => $caption,
'#header' => $header,
'#empty' => $this
->t('No menus found'),
];
foreach ($names as $id => $name) {
$form_part[$id] = [
'select' => [
'#type' => 'checkbox',
'#default_value' => array_key_exists($id, $this->configuration[$machine_name]) ? 1 : 0,
],
'menu' => [
'#markup' => $name,
],
'menu_weight' => [
'#type' => 'weight',
'#title_display' => 'invisible',
'#default_value' => array_key_exists($id, $this->configuration[$machine_name]) ? $this->configuration[$machine_name][$id]['menu_weight'] : 0,
],
'title' => [
'#type' => 'select',
'#options' => [
'do_not_show' => $this
->t('Do not show'),
'use_default' => $this
->t('Use default title'),
'manual' => $this
->t('Manual title'),
],
'#title_display' => 'invisible',
'#default_value' => array_key_exists($id, $this->configuration[$machine_name]) ? $this->configuration[$machine_name][$id]['title'] : 0,
],
'collapsible_title' => [
'#type' => 'checkbox',
'#default_value' => array_key_exists($id, $this->configuration[$machine_name]) ? $this->configuration[$machine_name][$id]['collapsible_title'] : 0,
],
'manual_title' => [
'#type' => 'textfield',
'#title_display' => 'invisible',
'#default_value' => array_key_exists($id, $this->configuration[$machine_name]) ? $this->configuration[$machine_name][$id]['manual_title'] : '',
],
];
}
return $form_part;
}
/**
* {@inheritdoc}
*/
public function blockValidate($form, FormStateInterface $form_state) {
parent::blockValidate($form, $form_state);
$values = $form_state
->getValues();
if (array_key_exists('breakpoints', $values) && $values['breakpoints']['all'] == '0') {
$breakpoints = $this->renderCheesebugerMenuService
->returnBreakpointsForDefaultTheme();
$breakpoints_order = [
'0',
];
foreach ($breakpoints as $breakpoint_name => $breakpoint) {
$breakpoints_order[] = $breakpoint_name;
}
if (array_search($values['breakpoints']['from'], $breakpoints_order) >= array_search($values['breakpoints']['to'], $breakpoints_order)) {
$form_state
->setErrorByName('from', $this
->t('The first breakpoint should be smaller than second!'));
}
}
}
/**
* Sends and store the block by collected data.
*/
public function blockSubmit($form, FormStateInterface $form_state) {
foreach ($form_state
->getValues() as $key => $value) {
$this->configuration[$key] = $value;
}
$this
->unsetNotSelected($this->configuration['menu']);
$this
->unsetNotSelected($this->configuration['taxonomy_vocabulary']);
$form_object = $form_state
->getFormObject();
if (method_exists($form_object, 'getEntity')) {
$entity = $form_object
->getEntity();
$this->configuration['block_machine_name'] = $entity
->id();
}
parent::blockSubmit($form, $form_state);
}
/**
* Unsets not selected array elements.
*/
public function unsetNotSelected(&$config_menus) {
if (is_string($config_menus)) {
$config_menus = [];
}
foreach ($config_menus as $id => &$config_menu) {
if ((bool) $config_menu['select']) {
unset($config_menu['select']);
}
else {
unset($config_menus[$id]);
}
}
}
/**
* Returns block machine name.
*/
private function getBlockMachineName() {
if (isset($this->configuration['block_machine_name'])) {
return $this->configuration['block_machine_name'];
}
$blocks = $this->entityTypeManager
->getStorage('block')
->loadByProperties([
'plugin' => $this
->getBaseId(),
]);
foreach ($blocks as $block) {
if ($block
->get('settings') == $this->configuration) {
return $block
->getOriginalId();
}
}
return FALSE;
}
/**
* Formats media query.
*/
public function formatBreakpoints($breakpoints) {
$breakpoints_theme = $this->renderCheesebugerMenuService
->returnBreakpointsForDefaultTheme();
$media_query = [];
if ($breakpoints['from'] == '0') {
$media_query['from'] = '0';
}
else {
$media_query['from'] = $breakpoints_theme[$breakpoints['from']]['mediaQuery'];
}
$media_query['to'] = $breakpoints_theme[$breakpoints['to']]['mediaQuery'];
return $media_query;
}
/**
* Validates all config.
* @deprecated
*/
public function validateConfiguration($config) {
$new_config_elements = [
'menu',
'taxonomy_vocabulary',
];
foreach ($new_config_elements as $new_config_element) {
if (!array_key_exists($new_config_element, $config)) {
return FALSE;
}
}
return TRUE;
}
/**
* Searches for some old config keys.
* @deprecated
*/
public function identifyOldConfig($config) {
$old_config_elements = [
'menus_appear',
'taxonomy_appear',
'menus_weight',
'taxonomy_weight',
];
foreach ($old_config_elements as $old_config_element) {
if (!array_key_exists($old_config_element, $config)) {
return FALSE;
}
}
return TRUE;
}
/**
* Building block.
*/
public function build() {
$config = $this
->getConfiguration();
if (!$this
->validateConfiguration($config)) {
if ($this
->identifyOldConfig($config)) {
$this->messenger
->addWarning($this
->t('Your current Cheeseburger Menu block configuration is not compatible with the newest release. You can either go edit the block and adjust its settings or, even better, delete the block and place it again.'), 'warning');
$this->messenger
->addWarning($this
->t('We are assuming that you have an old version of the Cheeseburger Menu, so take a note that there are some major changes in the new one, like the default CSS with the full design (you can turn it on/off in block settings).'));
}
else {
$this->messenger
->addWarning($this
->t('Your cheeseburger menu block configuration is not valid, try to save it again in block edit.'), 'warning');
}
return [
'#cache' => [
'max-age' => 0,
],
];
}
$url = Url::fromRouteMatch($this->routeMatch)
->toString();
$headerHeight = isset($config['header_height']) ? $config['header_height'] : 0;
$display_style = $config['hidden_by_default'] ? 'display: none; ' : '';
// TODO FIX THIS.
$render[] = [
'#type' => 'inline_template',
'#template' => '<div class="cheeseburger-menu__trigger"></div>
<div class="cheeseburger-menu__wrapper" style="' . $display_style . 'top: ' . $headerHeight . 'px">',
];
$render['#attached']['drupalSettings'] = [
'instant_show' => $config['breakpoints']['all'],
'breakpoints' => $config['breakpoints']['all'] ? [] : $this
->formatBreakpoints($config['breakpoints']),
'current_route' => $url,
'headerHeight' => $headerHeight,
'block_id' => $this
->getBlockMachineName(),
];
if ($config['breakpoints']['all']) {
$render[] = $this->renderCheesebugerMenuService
->renderTree($config, $url);
}
$render[] = [
'#markup' => '</div>',
];
if ($config['css_default']) {
$render['#attached']['library'][] = 'cheeseburger_menu/cheeseburger_menu.css';
}
return $render;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockPluginInterface:: |
constant | Indicates the block label (title) should be displayed to end users. | ||
BlockPluginTrait:: |
protected | property | The transliteration service. | |
BlockPluginTrait:: |
public | function | ||
BlockPluginTrait:: |
protected | function | Returns generic default configuration for block plugins. | |
BlockPluginTrait:: |
protected | function | Indicates whether the block should be shown. | 16 |
BlockPluginTrait:: |
public | function | Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements. | 2 |
BlockPluginTrait:: |
public | function | ||
BlockPluginTrait:: |
public | function | 1 | |
BlockPluginTrait:: |
public | function | 1 | |
BlockPluginTrait:: |
public | function | 3 | |
BlockPluginTrait:: |
public | function | ||
BlockPluginTrait:: |
public | function | ||
BlockPluginTrait:: |
public | function | ||
BlockPluginTrait:: |
public | function | Sets the transliteration service. | |
BlockPluginTrait:: |
public | function | Most block plugins should not override this method. To add submission handling for a specific block type, override BlockBase::blockSubmit(). | |
BlockPluginTrait:: |
protected | function | Wraps the transliteration service. | |
BlockPluginTrait:: |
public | function | Most block plugins should not override this method. To add validation for a specific block type, override BlockBase::blockValidate(). | 1 |
CheeseburgerMenu:: |
protected | property | The breakpoint manager. | |
CheeseburgerMenu:: |
protected | property | Database service. | |
CheeseburgerMenu:: |
protected | property | The entity field manager. | |
CheeseburgerMenu:: |
protected | property | The entity type manager. | |
CheeseburgerMenu:: |
protected | property | The language manager. | |
CheeseburgerMenu:: |
protected | property | The menu link tree. | |
CheeseburgerMenu:: |
protected | property | The module handler. | |
CheeseburgerMenu:: |
protected | property | Cheesebuger menu serice. | |
CheeseburgerMenu:: |
protected | property | The renderer. | |
CheeseburgerMenu:: |
protected | property | The route match interface. | |
CheeseburgerMenu:: |
protected | property | The theme handler. | |
CheeseburgerMenu:: |
public | function |
Block form. Overrides BlockPluginTrait:: |
|
CheeseburgerMenu:: |
public | function |
Sends and store the block by collected data. Overrides BlockPluginTrait:: |
|
CheeseburgerMenu:: |
public | function |
Overrides BlockPluginTrait:: |
|
CheeseburgerMenu:: |
public | function |
Building block. Overrides BlockPluginInterface:: |
|
CheeseburgerMenu:: |
public | function | Builds menu table. | |
CheeseburgerMenu:: |
public | function | Returns default menu form element. | |
CheeseburgerMenu:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
CheeseburgerMenu:: |
public | function |
Overrides BlockPluginTrait:: |
|
CheeseburgerMenu:: |
public | function | Formats media query. | |
CheeseburgerMenu:: |
private | function | Returns block machine name. | |
CheeseburgerMenu:: |
public | function | Searches for some old config keys. | |
CheeseburgerMenu:: |
public | function | Unsets not selected array elements. | |
CheeseburgerMenu:: |
public | function | Validates all config. | |
CheeseburgerMenu:: |
public | function |
CheeseburgerMenu constructor. Overrides BlockPluginTrait:: |
|
ContextAwarePluginAssignmentTrait:: |
protected | function | Builds a form element for assigning a context to a given slot. | |
ContextAwarePluginAssignmentTrait:: |
protected | function | Wraps the context handler. | |
ContextAwarePluginBase:: |
protected | property | The data objects representing the context of this plugin. | |
ContextAwarePluginBase:: |
private | property | Data objects representing the contexts passed in the plugin configuration. | |
ContextAwarePluginBase:: |
protected | function |
Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyInterface:: |
9 |
ContextAwarePluginBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: |
7 |
ContextAwarePluginBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyInterface:: |
4 |
ContextAwarePluginBase:: |
public | function |
This code is identical to the Component in order to pick up a different
Context class. Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
Gets a mapping of the expected assignment names to their context names. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function |
Gets the defined contexts. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function |
Gets the value for a defined context. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function |
Gets the values for all defined contexts. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function |
Set a context on this plugin. Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
Sets a mapping of the expected assignment names to their context names. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function |
Sets the value for a defined context. Overrides ContextAwarePluginBase:: |
|
ContextAwarePluginBase:: |
public | function |
Validates the set values for the defined contexts. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginBase:: |
public | function | Implements magic __get() method. | |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginWithFormsTrait:: |
public | function | ||
PluginWithFormsTrait:: |
public | function | ||
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
TypedDataTrait:: |
protected | property | The typed data manager used for creating the data types. | |
TypedDataTrait:: |
public | function | Gets the typed data manager. | 2 |
TypedDataTrait:: |
public | function | Sets the typed data manager. | 2 |