
| Current Path : /var/www/html1/testsite/web/modules/contrib/metatag/src/Plugin/metatag/Group/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/testsite/web/modules/contrib/metatag/src/Plugin/metatag/Group/GroupBase.php |
<?php
namespace Drupal\metatag\Plugin\metatag\Group;
use Drupal\Component\Plugin\PluginBase;
/**
* Each group will extend this base.
*/
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;
}
}