interface ExtraFieldFormInterface in Extra Field 8.2
Defines an interface for Extra Field Form plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\extra_field\Plugin\ExtraFieldFormInterface
Expanded class hierarchy of ExtraFieldFormInterface
All classes that implement ExtraFieldFormInterface
File
- src/
Plugin/ ExtraFieldFormInterface.php, line 13
Namespace
Drupal\extra_field\PluginView source
interface ExtraFieldFormInterface extends PluginInspectionInterface {
/**
* Builds a renderable array for the field.
*
* @param array $form
* The entity form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state object.
*
* @return array
* Renderable array.
*/
public function formElement(array &$form, FormStateInterface $form_state);
/**
* Stores the field's parent entity.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity that hosts the field.
*/
public function setEntity(ContentEntityInterface $entity);
/**
* Returns the field's parent entity.
*
* @return \Drupal\Core\Entity\ContentEntityInterface
* The entity that hosts the field.
*/
public function getEntity();
/**
* Stores the entity form display.
*
* @param \Drupal\Core\Entity\Display\EntityFormDisplayInterface $display
* The entity form display holding the display options configured for the
* entity components.
*/
public function setEntityFormDisplay(EntityFormDisplayInterface $display);
/**
* Returns the entity form display object of the field's host entity.
*
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface
* The entity view display object.
*/
public function getEntityFormDisplay();
/**
* Stores the entity form mode.
*
* @param string $form_mode
* The form mode the entity is rendered in.
*/
public function setFormMode($form_mode);
/**
* Returns the entity form mode of the field's host entity.
*
* @return string
* The form mode the field is being rendered in.
*/
public function getFormMode();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExtraFieldFormInterface:: |
public | function | Builds a renderable array for the field. | 4 |
ExtraFieldFormInterface:: |
public | function | Returns the field's parent entity. | 1 |
ExtraFieldFormInterface:: |
public | function | Returns the entity form display object of the field's host entity. | 1 |
ExtraFieldFormInterface:: |
public | function | Returns the entity form mode of the field's host entity. | 1 |
ExtraFieldFormInterface:: |
public | function | Stores the field's parent entity. | 1 |
ExtraFieldFormInterface:: |
public | function | Stores the entity form display. | 1 |
ExtraFieldFormInterface:: |
public | function | Stores the entity form mode. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |