You are here

interface DsFieldTemplateInterface in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 src/Plugin/DsFieldTemplate/DsFieldTemplateInterface.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateInterface
  2. 8.3 src/Plugin/DsFieldTemplate/DsFieldTemplateInterface.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateInterface

Defines a common interface for all ds field template plugins.

Hierarchy

Expanded class hierarchy of DsFieldTemplateInterface

All classes that implement DsFieldTemplateInterface

File

src/Plugin/DsFieldTemplate/DsFieldTemplateInterface.php, line 10

Namespace

Drupal\ds\Plugin\DsFieldTemplate
View source
interface DsFieldTemplateInterface {

  /**
   * Lets you add you add additional form element for your layout.
   *
   * @param array $form
   *   Nested array of form elements that comprise the form.
   */
  public function alterForm(&$form);

  /**
   * Gets the entity this layout belongs too.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The entity.
   */
  public function getEntity();

  /**
   * Sets the entity this layout belong too.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity.
   */
  public function setEntity(EntityInterface $entity);

  /**
   * Massages the values before they get rendered.
   *
   * @param array $field_settings
   *   The ds field settings.
   * @param array $values
   *   The values.
   */
  public function massageRenderValues(&$field_settings, $values);

  /**
   * Gets the chosen theme function.
   *
   * @return string
   *   The theme function.
   */
  public function getThemeFunction();

  /**
   * Creates default configuration for the layout.
   *
   * @return array
   *   Keyed array of default settings.
   */
  public function defaultConfiguration();

  /**
   * Get the selected configuration.
   *
   * @return array
   *   Keyed array of configuration values.
   */
  public function getConfiguration();

  /**
   * Set the configuration for this layout.
   *
   * @param array $configuration
   *   Keyed array of new configuration values.
   */
  public function setConfiguration(array $configuration);

}

Members

Namesort descending Modifiers Type Description Overrides
DsFieldTemplateInterface::alterForm public function Lets you add you add additional form element for your layout. 1
DsFieldTemplateInterface::defaultConfiguration public function Creates default configuration for the layout. 1
DsFieldTemplateInterface::getConfiguration public function Get the selected configuration. 1
DsFieldTemplateInterface::getEntity public function Gets the entity this layout belongs too. 1
DsFieldTemplateInterface::getThemeFunction public function Gets the chosen theme function. 1
DsFieldTemplateInterface::massageRenderValues public function Massages the values before they get rendered. 1
DsFieldTemplateInterface::setConfiguration public function Set the configuration for this layout. 1
DsFieldTemplateInterface::setEntity public function Sets the entity this layout belong too. 1