You are here

TcaPluginInterface.php in Token Content Access 8

Same filename and directory in other branches
  1. 2.0.x src/Plugin/TcaPluginInterface.php

Namespace

Drupal\tca\Plugin

File

src/Plugin/TcaPluginInterface.php
View source
<?php

namespace Drupal\tca\Plugin;

use Drupal\Component\Plugin\PluginInspectionInterface;

/**
 * Defines an interface for TCA plugins.
 */
interface TcaPluginInterface extends PluginInspectionInterface {

  /**
   * The fildable mark.
   *
   * Return TRUE if will the settings be stored in fields,
   * otherwise, settings will be stored in config.
   *
   * @return bool
   *   The fildable mark.
   */
  public function isFieldable();

  /**
   * 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();

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

  /**
   * 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();

}

Interfaces

Namesort descending Description
TcaPluginInterface Defines an interface for TCA plugins.