interface EmptyFieldPluginInterface in Empty fields 8
Defines an interface for empty fields.
Hierarchy
- interface \Drupal\empty_fields\EmptyFieldPluginInterface
Expanded class hierarchy of EmptyFieldPluginInterface
All classes that implement EmptyFieldPluginInterface
See also
\Drupal\empty_fields\Annotation\EmptyField
\Drupal\empty_fields\EmptyFieldPluginBase
\Drupal\empty_fields\EmptyFieldsPluginManager
File
- src/
EmptyFieldPluginInterface.php, line 15
Namespace
Drupal\empty_fieldsView source
interface EmptyFieldPluginInterface {
/**
* Builds render array for empty field.
*
* @param array $context
* An associative array containing:
* - entity: The entity being rendered.
* - view_mode: The view mode; for example, 'full' or 'teaser'.
* - display: The EntityDisplay holding the display options.
*
* @var array
* Renderable array to display.
*/
public function react(array $context);
/**
* Returns the configuration form elements specific to this plugin.
*
* Plugins that need to add form elements to the configuration
* form should implement this method.
*
* @param array $form
* The form definition array for the block configuration form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* The renderable form array representing the entire configuration form.
*
* @see \Drupal\Core\Field\FormatterInterface::settingsForm()
*/
public function settingsForm(array $form, FormStateInterface $form_state);
/**
* Returns a short summary line for the current formatter settings.
*
* @return string
* Text for the field formatter settings summary.
*
* @see \Drupal\Core\Field\FormatterInterface::settingsSummary()
*/
public function settingsSummary();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EmptyFieldPluginInterface:: |
public | function | Builds render array for empty field. | 1 |
EmptyFieldPluginInterface:: |
public | function | Returns the configuration form elements specific to this plugin. | 1 |
EmptyFieldPluginInterface:: |
public | function | Returns a short summary line for the current formatter settings. | 1 |