abstract class TcaPluginBase in Token Content Access 8
Same name and namespace in other branches
- 2.0.x src/Plugin/TcaPluginBase.php \Drupal\tca\Plugin\TcaPluginBase
Base class for TCA plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\tca\Plugin\TcaPluginBase implements TcaPluginInterface
Expanded class hierarchy of TcaPluginBase
2 files declare their use of TcaPluginBase
- Node.php in modules/
tca_node/ src/ Plugin/ TcaPlugin/ Node.php - Product.php in modules/
tca_commerce_product/ src/ Plugin/ TcaPlugin/ Product.php
File
- src/
Plugin/ TcaPluginBase.php, line 10
Namespace
Drupal\tca\PluginView source
abstract class TcaPluginBase extends PluginBase implements TcaPluginInterface {
/**
* {@inheritdoc}
*/
public function isFieldable() {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function getFormSubmitHandlerAttachLocations() {
return [
[
'actions',
'submit',
'#submit',
],
];
}
/**
* {@inheritdoc}
*/
public function getBundleFormSubmitHandlerAttachLocations() {
return [
[
'actions',
'submit',
'#submit',
],
];
}
/**
* {@inheritdoc}
*/
public function getEntityTokenMap() {
$map = [];
$map[$this->pluginDefinition['entityType']] = $this->pluginDefinition['entityType'];
$bundle = \Drupal::entityTypeManager()
->getDefinition($this->pluginDefinition['entityType'])
->getBundleEntityType();
if (!empty($bundle)) {
$map[$bundle] = $bundle;
}
return $map;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 |
TcaPluginBase:: |
public | function |
Return locations to attach submit handlers to entity bundles. Overrides TcaPluginInterface:: |
2 |
TcaPluginBase:: |
public | function |
Return a map of entity IDs used by this plugin to token IDs. Overrides TcaPluginInterface:: |
|
TcaPluginBase:: |
public | function |
Return locations to attach submit handlers to entities. Overrides TcaPluginInterface:: |
2 |
TcaPluginBase:: |
public | function |
The fildable mark. Overrides TcaPluginInterface:: |
2 |