You are here

class Attribute in Linkit 8.4

Defines an attribute annotation object.

Plugin Namespace: Plugin\Linkit\Attribute

For a working example, see \Drupal\linkit\Plugin\Linkit\Attribute\Title

Hierarchy

Expanded class hierarchy of Attribute

See also

\Drupal\linkit\AttributeInterface

\Drupal\linkit\AttributeBase

\Drupal\linkit\AttributeManager

Plugin API

1 string reference to 'Attribute'
OverviewForm::buildForm in src/Form/Attribute/OverviewForm.php
Form constructor.
7 classes are annotated with Attribute
Accesskey in src/Plugin/Linkit/Attribute/Accesskey.php
Accesskey attribute.
ConfigurableDummyAttribute in tests/linkit_test/src/Plugin/Linkit/Attribute/ConfigurableDummyAttribute.php
Accesskey attribute.
DummyAttribute in tests/linkit_test/src/Plugin/Linkit/Attribute/DummyAttribute.php
Accesskey attribute.
Id in src/Plugin/Linkit/Attribute/Id.php
Id attribute.
Relationship in src/Plugin/Linkit/Attribute/Relationship.php
Relationship attribute.

... See full list

File

src/Annotation/Attribute.php, line 26
Contains \Drupal\linkit\Annotation\Attribute.

Namespace

Drupal\linkit\Annotation
View source
class Attribute extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the attribute.
   *
   * The string should be wrapped in a @Translation().
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $label;

  /**
   * The real HTML attribute name for this attribute.
   *
   * @var string
   */
  public $html_name;

  /**
   * A brief description of the attribute.
   *
   * This will be shown when adding or configuring a profile.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation (optional)
   */
  public $description = '';

  /**
   * A default weight for the attribute.
   *
   * @var int (optional)
   */
  public $weight = 0;

}

Members

Namesort descending Modifiers Type Description Overrides
Attribute::$description public property A brief description of the attribute.
Attribute::$html_name public property The real HTML attribute name for this attribute.
Attribute::$id public property The plugin ID.
Attribute::$label public property The human-readable name of the attribute.
Attribute::$weight public property A default weight for the attribute.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2