abstract class GroupBase in Metatag 8
Each group will extend this base.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\metatag\Plugin\metatag\Group\GroupBase
Expanded class hierarchy of GroupBase
17 files declare their use of GroupBase
- AndroidMobile.php in metatag_mobile/
src/ Plugin/ metatag/ Group/ AndroidMobile.php - AppleMobile.php in metatag_mobile/
src/ Plugin/ metatag/ Group/ AppleMobile.php - AppLinks.php in metatag_app_links/
src/ Plugin/ metatag/ Group/ AppLinks.php - DublinCore.php in metatag_dc/
src/ Plugin/ metatag/ Group/ DublinCore.php - DublinCoreAdvanced.php in metatag_dc_advanced/
src/ Plugin/ metatag/ Group/ DublinCoreAdvanced.php
1 string reference to 'GroupBase'
- GenerateGroupCommand::interact in src/
Command/ GenerateGroupCommand.php
File
- src/
Plugin/ metatag/ Group/ GroupBase.php, line 10
Namespace
Drupal\metatag\Plugin\metatag\GroupView source
abstract class GroupBase extends PluginBase {
/**
* Machine name of the meta tag group plugin.
*
* @var string
*/
protected $id;
/**
* The name of the group.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
protected $label;
/**
* Description of the group.
*
* @var string
*/
protected $description;
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
// Set the properties from the annotation.
// @todo Should we have setProperty() methods for each of these?
$this->id = $plugin_definition['id'];
$this->label = $plugin_definition['label'];
$this->description = $plugin_definition['description'];
}
/**
* Get this group's internal ID.
*
* @return string
* This group's ID.
*/
public function id() {
return $this->id;
}
/**
* Get this group's human-friendly name.
*
* @return string
* This group's human-friendly name.
*/
public function label() {
return $this->label;
}
/**
* This group object's description.
*
* @return string
* This group's ID.
*/
public function description() {
return $this->description;
}
/**
* Whether or not this group is being used.
*
* @return bool
* Whether this group has been enabled.
*/
public function isActive() {
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GroupBase:: |
protected | property | Description of the group. | |
GroupBase:: |
protected | property | Machine name of the meta tag group plugin. | |
GroupBase:: |
protected | property | The name of the group. | |
GroupBase:: |
public | function | This group object's description. | |
GroupBase:: |
public | function | Get this group's internal ID. | |
GroupBase:: |
public | function | Whether or not this group is being used. | |
GroupBase:: |
public | function | Get this group's human-friendly name. | |
GroupBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
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. |