You are here

interface FieldGroupFormatterInterface in Field Group 8

Same name and namespace in other branches
  1. 8.3 src/FieldGroupFormatterInterface.php \Drupal\field_group\FieldGroupFormatterInterface

Interface definition for fieldgroup formatter plugins.

Hierarchy

Expanded class hierarchy of FieldGroupFormatterInterface

All classes that implement FieldGroupFormatterInterface

File

src/FieldGroupFormatterInterface.php, line 12

Namespace

Drupal\field_group
View source
interface FieldGroupFormatterInterface extends PluginInspectionInterface {

  /**
   * Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
   *
   * @param array $element
   *   The field group render array.
   * @param object $rendering_object
   *   The object / entity beïng rendered.
   */
  public function preRender(&$element, $rendering_object);

  /**
   * Returns a form to configure settings for the formatter.
   *
   * Invoked in field_group_field_ui_display_form_alter to allow
   * administrators to configure the formatter. The field_group module takes care
   * of handling submitted form values.
   *
   * @return array
   *   The form elements for the formatter settings.
   */
  public function settingsForm();

  /**
   * Returns a short summary for the current formatter settings.
   *
   * If an empty result is returned, a UI can still be provided to display
   * a settings form in case the formatter has configurable settings.
   *
   * @return array()
   *   A short summary of the formatter settings.
   */
  public function settingsSummary();

  /**
   * Defines the default settings for this plugin.
   *
   * @param string $context
   *   The context to get the default settings for.
   *
   * @return array
   *   A list of default settings, keyed by the setting name.
   */
  public static function defaultContextSettings($context);

}

Members

Namesort descending Modifiers Type Description Overrides
FieldGroupFormatterInterface::defaultContextSettings public static function Defines the default settings for this plugin. 1
FieldGroupFormatterInterface::preRender public function Allows the field group formatter to manipulate the field group array and attach the formatters rendering element. 1
FieldGroupFormatterInterface::settingsForm public function Returns a form to configure settings for the formatter. 1
FieldGroupFormatterInterface::settingsSummary public function Returns a short summary for the current formatter settings. 1
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