interface AttributeInterface in Linkit 8.4
Defines the interface for attributes plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurablePluginInterface- interface \Drupal\linkit\AttributeInterface
 
Expanded class hierarchy of AttributeInterface
All classes that implement AttributeInterface
See also
\Drupal\linkit\Annotation\Attribute
\Drupal\linkit\AttributeManager
File
- src/AttributeInterface.php, line 21 
- Contains \Drupal\linkit\AttributeInterface.
Namespace
Drupal\linkitView 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><a></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
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| AttributeInterface:: | public | function | The form element structure for this attribute to be used in the dialog. | 7 | 
| AttributeInterface:: | public | function | Returns the attribute description. | 1 | 
| AttributeInterface:: | public | function | Returns the attribute html name. This is the name of the attribute that will be inserted in the <code><a></code> tag. | 1 | 
| AttributeInterface:: | public | function | Returns the attribute label. | 1 | 
| AttributeInterface:: | public | function | Returns the weight of the attribute. | 1 | 
| AttributeInterface:: | public | function | Sets the weight for this attribute. | 1 | 
| ConfigurablePluginInterface:: | public | function | Gets default configuration for this plugin. | 1 | 
| ConfigurablePluginInterface:: | public | function | Gets this plugin's configuration. | 1 | 
| ConfigurablePluginInterface:: | public | function | Sets the configuration for this plugin instance. | 1 | 
| DependentPluginInterface:: | public | function | Calculates dependencies for the configured plugin. | 19 | 
| PluginInspectionInterface:: | public | function | Gets the definition of the plugin implementation. | 4 | 
| PluginInspectionInterface:: | public | function | Gets the plugin_id of the plugin instance. | 2 | 
