You are here

interface RabbitHoleEntityPluginInterface in Rabbit Hole 8

Same name and namespace in other branches
  1. 2.x src/Plugin/RabbitHoleEntityPluginInterface.php \Drupal\rabbit_hole\Plugin\RabbitHoleEntityPluginInterface

Defines an interface for Rabbit hole entity plugin plugins.

Hierarchy

Expanded class hierarchy of RabbitHoleEntityPluginInterface

All classes that implement RabbitHoleEntityPluginInterface

File

src/Plugin/RabbitHoleEntityPluginInterface.php, line 11

Namespace

Drupal\rabbit_hole\Plugin
View source
interface RabbitHoleEntityPluginInterface extends PluginInspectionInterface {

  /**
   * Return locations to attach submit handlers to entities.
   *
   * This should return an array of arrays, e.g.:
   * [
   *   ['actions', 'submit', '#publish'],
   *   ['actions', 'publish', '#submit'],
   * ].
   */
  public function getFormSubmitHandlerAttachLocations(array $form, FormStateInterface $form_state);

  /**
   * Return locations to attach submit handlers to entity bundle form.
   *
   * This should return an array of arrays, e.g.:
   * [
   *   ['actions', 'submit', '#publish'],
   *   ['actions', 'publish', '#submit'],
   * ].
   *
   * @return array
   *   A multidimensional array.
   */
  public function getBundleFormSubmitHandlerAttachLocations(array $form, FormStateInterface $form_state);

  /**
   * Return the form ID of the config form for this plugin's entity.
   *
   * Return the form ID of the global config form for the entity targeted by
   * this plugin.
   *
   * @return string
   *   The form ID of the global config form.
   */
  public function getGlobalConfigFormId();

  /**
   * Return locations to attach submit handlers to the global config form.
   *
   * This should return an array of arrays, e.g.:
   * [
   *   ['actions', 'submit', '#publish'],
   *   ['actions', 'publish', '#submit'],
   * ].
   */
  public function getGlobalFormSubmitHandlerAttachLocations(array $form, FormStateInterface $form_state);

  /**
   * Return a map of entity IDs used by this plugin to token IDs.
   *
   * @return array
   *   A map of token IDs to entity IDs in the form
   *   ['entity ID' => 'token ID']
   */
  public function getEntityTokenMap();

}

Members

Namesort descending Modifiers Type Description Overrides
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
RabbitHoleEntityPluginInterface::getBundleFormSubmitHandlerAttachLocations public function Return locations to attach submit handlers to entity bundle form. 1
RabbitHoleEntityPluginInterface::getEntityTokenMap public function Return a map of entity IDs used by this plugin to token IDs. 1
RabbitHoleEntityPluginInterface::getFormSubmitHandlerAttachLocations public function Return locations to attach submit handlers to entities. 1
RabbitHoleEntityPluginInterface::getGlobalConfigFormId public function Return the form ID of the config form for this plugin's entity. 1
RabbitHoleEntityPluginInterface::getGlobalFormSubmitHandlerAttachLocations public function Return locations to attach submit handlers to the global config form. 1