You are here

interface AttributeInterface in Linkit 8.4

Defines the interface for attributes plugins.

Hierarchy

Expanded class hierarchy of AttributeInterface

All classes that implement AttributeInterface

See also

\Drupal\linkit\Annotation\Attribute

\Drupal\linkit\AttributeBase

\Drupal\linkit\AttributeManager

Plugin API

File

src/AttributeInterface.php, line 21
Contains \Drupal\linkit\AttributeInterface.

Namespace

Drupal\linkit
View source
interface AttributeInterface extends PluginInspectionInterface, ConfigurablePluginInterface {

  /**
   * Returns the attribute label.
   *
   * @return string
   *   The attribute label.
   */
  public function getLabel();

  /**
   * Returns the attribute description.
   *
   * @return string
   *   The attribute description.
   */
  public function getDescription();

  /**
   * Returns the attribute html name. This is the name of the attribute
   * that will be inserted in the <code>&lt;a&gt;</code> tag.
   *
   * @return string
   *   The attribute html name.
   */
  public function getHtmlName();

  /**
   * Returns the weight of the attribute.
   *
   * @return int|string
   *   Either the integer weight of the attribute or an empty string.
   */
  public function getWeight();

  /**
   * Sets the weight for this attribute.
   *
   * @param int $weight
   *   The weight for this attribute.
   *
   * @return $this
   */
  public function setWeight($weight);

  /**
   * The form element structure for this attribute to be used in the dialog.
   *
   * @param mixed $default_value
   *   The default value for the element. Used when editing an attribute in the
   *   dialog.
   *
   * @return array
   *   The form element.
   */
  public function buildFormElement($default_value);

}

Members

Namesort descending Modifiers Type Description Overrides
AttributeInterface::buildFormElement public function The form element structure for this attribute to be used in the dialog. 7
AttributeInterface::getDescription public function Returns the attribute description. 1
AttributeInterface::getHtmlName public function Returns the attribute html name. This is the name of the attribute that will be inserted in the <code>&lt;a&gt;</code> tag. 1
AttributeInterface::getLabel public function Returns the attribute label. 1
AttributeInterface::getWeight public function Returns the weight of the attribute. 1
AttributeInterface::setWeight public function Sets the weight for this attribute. 1
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2