interface ContentEntityFormInterface in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php \Drupal\Core\Entity\ContentEntityFormInterface
Defines a common interface for content entity form classes.
Hierarchy
- interface \Drupal\Core\Form\FormInterface
- interface \Drupal\Core\Form\BaseFormIdInterface
- interface \Drupal\Core\Entity\EntityFormInterface
- interface \Drupal\Core\Entity\ContentEntityFormInterface
- interface \Drupal\Core\Entity\EntityFormInterface
- interface \Drupal\Core\Form\BaseFormIdInterface
Expanded class hierarchy of ContentEntityFormInterface
All classes that implement ContentEntityFormInterface
2 files declare their use of ContentEntityFormInterface
- content_translation.module in core/
modules/ content_translation/ content_translation.module - Allows entities to be translated into different languages.
- language.module in core/
modules/ language/ language.module - Add language handling functionality to Drupal.
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityFormInterface.php, line 16 - Contains \Drupal\Core\Entity\ContentEntityFormInterface.
Namespace
Drupal\Core\EntityView source
interface ContentEntityFormInterface extends EntityFormInterface {
/**
* Gets the form display.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface.
* The current form display.
*/
public function getFormDisplay(FormStateInterface $form_state);
/**
* Sets the form display.
*
* Sets the form display which will be used for populating form element
* defaults.
*
* @param \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display
* The form display that the current form operates with.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return $this
*/
public function setFormDisplay(EntityFormDisplayInterface $form_display, FormStateInterface $form_state);
/**
* Gets the code identifying the active form language.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return string
* The form language code.
*/
public function getFormLangcode(FormStateInterface $form_state);
/**
* Checks whether the current form language matches the entity one.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return bool
* Returns TRUE if the entity form language matches the entity one.
*/
public function isDefaultFormLangcode(FormStateInterface $form_state);
/**
* {@inheritdoc}
*
* Note that extending classes should not override this method to add entity
* validation logic, but define further validation constraints using the
* entity validation API and/or provide a new validation constraint if
* necessary. This is the only way to ensure that the validation logic
* is correctly applied independently of form submissions; e.g., for REST
* requests.
* For more information about entity validation, see
* https://www.drupal.org/node/2015613.
*
* @return \Drupal\Core\Entity\ContentEntityTypeInterface
* The built entity.
*/
public function validateForm(array &$form, FormStateInterface $form_state);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseFormIdInterface:: |
public | function | Returns a string identifying the base form. | 2 |
ContentEntityFormInterface:: |
public | function | Gets the form display. | 1 |
ContentEntityFormInterface:: |
public | function | Gets the code identifying the active form language. | 1 |
ContentEntityFormInterface:: |
public | function | Checks whether the current form language matches the entity one. | 1 |
ContentEntityFormInterface:: |
public | function | Sets the form display. | 1 |
ContentEntityFormInterface:: |
public | function |
Note that extending classes should not override this method to add entity
validation logic, but define further validation constraints using the
entity validation API and/or provide a new validation constraint if
necessary. This is the only way to… Overrides FormInterface:: |
|
EntityFormInterface:: |
public | function | Builds an updated entity object based upon the submitted form values. | 1 |
EntityFormInterface:: |
public | function | Gets the form entity. | 1 |
EntityFormInterface:: |
public | function | Determines which entity will be used by this form from a RouteMatch object. | 1 |
EntityFormInterface:: |
public | function | Gets the operation identifying the form. | 1 |
EntityFormInterface:: |
public | function | Form submission handler for the 'save' action. | 1 |
EntityFormInterface:: |
public | function | Sets the form entity. | 1 |
EntityFormInterface:: |
public | function | Sets the entity manager for this form. | 1 |
EntityFormInterface:: |
public | function | Sets the entity type manager for this form. | 1 |
EntityFormInterface:: |
public | function | Sets the module handler for this form. | 1 |
EntityFormInterface:: |
public | function | Sets the operation for this form. | 1 |
EntityFormInterface:: |
public | function | Sets the string translation service for this form. | |
FormInterface:: |
public | function | Form constructor. | 157 |
FormInterface:: |
public | function | Returns a unique string identifying the form. | 212 |
FormInterface:: |
public | function | Form submission handler. | 167 |