You are here

abstract class GroupBase in Metatag 8

Each group will extend this base.

Hierarchy

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

... See full list

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\Group
View 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

Namesort descending Modifiers Type Description Overrides
GroupBase::$description protected property Description of the group.
GroupBase::$id protected property Machine name of the meta tag group plugin.
GroupBase::$label protected property The name of the group.
GroupBase::description public function This group object's description.
GroupBase::id public function Get this group's internal ID.
GroupBase::isActive public function Whether or not this group is being used.
GroupBase::label public function Get this group's human-friendly name.
GroupBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.