interface FormatterTypeInterface in Custom Formatters 8.3
Interface FormatterInterface.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\custom_formatters\FormatterTypeInterface
Expanded class hierarchy of FormatterTypeInterface
All classes that implement FormatterTypeInterface
File
- src/
FormatterTypeInterface.php, line 12
Namespace
Drupal\custom_formattersView source
interface FormatterTypeInterface extends PluginInspectionInterface {
/**
* Calculates dependencies and stores them in the dependency property.
*
* @return array
* A keyed array of dependencies.
*/
public function calculateDependencies();
/**
* Builds a renderable array for a field value.
*
* @param \Drupal\Core\Field\FieldItemListInterface $items
* The field values to be rendered.
* @param string $langcode
* The language that should be used to render the field.
*
* @return array
* A renderable array for $items, as an array of child elements keyed by
* consecutive numeric indexes starting from 0.
*/
public function viewElements(FieldItemListInterface $items, $langcode);
/**
* Formatter type plugin settings form submit callback.
*
* @param array $form
* The Form API array.
* @param FormStateInterface $form_state
* The Form state interface.
*/
public function submitForm(array $form, FormStateInterface $form_state);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormatterTypeInterface:: |
public | function | Calculates dependencies and stores them in the dependency property. | 1 |
FormatterTypeInterface:: |
public | function | Formatter type plugin settings form submit callback. | 1 |
FormatterTypeInterface:: |
public | function | Builds a renderable array for a field value. | 4 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |