class NodeNid in ThemeKey 8
Same name in this branch
- 8 src/Plugin/Property/NodeNid.php \Drupal\themekey\Plugin\Property\NodeNid
- 8 src/Plugin/PropertyAdmin/NodeNid.php \Drupal\themekey\Plugin\PropertyAdmin\NodeNid
Provides a 'node id' property.
Plugin annotation
@Property(
id = "node:nid",
name = @Translation(""),
description = @Translation(""),
page_cache_compatible = TRUE,
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\themekey\Plugin\SingletonPluginBase implements ContainerFactoryPluginInterface
- class \Drupal\themekey\PropertyBase implements PropertyInterface
- class \Drupal\themekey\Plugin\Property\NodeNid
- class \Drupal\themekey\PropertyBase implements PropertyInterface
- class \Drupal\themekey\Plugin\SingletonPluginBase implements ContainerFactoryPluginInterface
Expanded class hierarchy of NodeNid
File
- src/
Plugin/ Property/ NodeNid.php, line 22 - Contains \Drupal\themekey\Plugin\Property\DrupalRouteName.
Namespace
Drupal\themekey\Plugin\PropertyView source
class NodeNid extends PropertyBase {
/**
* @return array
* array of drupal:route_name values
*/
public function getValues() {
$node = $this
->getRouteMatch()
->getParameter('node');
return is_null($node) ?: array(
$node
->get('nid')->value,
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NodeNid:: |
public | function |
Overrides PropertyInterface:: |
|
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. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
PropertyBase:: |
protected | property | ||
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function |
Return the Description of the ThemeKey property. Overrides PropertyInterface:: |
|
PropertyBase:: |
public | function |
Return the name of the ThemeKey property. Overrides PropertyInterface:: |
|
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function | ||
SingletonPluginBase:: |
protected static | property | ||
SingletonPluginBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |