You are here

interface ActionLinkTypePluginInterface in Flag 8.4

Provides an interface for link type plugins.

Hierarchy

Expanded class hierarchy of ActionLinkTypePluginInterface

All classes that implement ActionLinkTypePluginInterface

File

src/ActionLink/ActionLinkTypePluginInterface.php, line 13

Namespace

Drupal\flag\ActionLink
View source
interface ActionLinkTypePluginInterface extends PluginFormInterface, ConfigurableInterface {

  /**
   * Get the action link formatted for use in entity links.
   *
   * @param \Drupal\flag\FlagInterface $flag
   *   The flag entity.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The flaggable entity.
   *
   * @return array
   *   The render array.
   */
  public function getAsFlagLink(FlagInterface $flag, EntityInterface $entity);

  /**
   * Get the action link as a Link object.
   *
   * @param \Drupal\flag\FlagInterface $flag
   *   The flag entity.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The flaggable entity.
   *
   * @return \Drupal\Core\Link
   *   The action Link.
   */
  public function getAsLink(FlagInterface $flag, EntityInterface $entity);

}

Members

Namesort descending Modifiers Type Description Overrides
ActionLinkTypePluginInterface::getAsFlagLink public function Get the action link formatted for use in entity links. 1
ActionLinkTypePluginInterface::getAsLink public function Get the action link as a Link object. 1
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18