function EntityForm::save

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::save()
  2. 10 core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::save()
  3. 8.9.x core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::save()
3 calls to EntityForm::save()
MediaForm::save in core/modules/media/src/MediaForm.php
OverridesEntityForm::save in core/modules/layout_builder/src/Form/OverridesEntityForm.php
PathAliasForm::save in core/modules/path/src/PathAliasForm.php
2 methods override EntityForm::save()
ResponsiveImageStyleForm::save in core/modules/responsive_image/src/ResponsiveImageStyleForm.php
Form submission handler for the 'save' action.
WorkflowStateAddForm::save in core/modules/workflows/src/Form/WorkflowStateAddForm.php
Form submission handler for the 'save' action.

File

core/lib/Drupal/Core/Entity/EntityForm.php, line 284

Class

EntityForm
Base class for entity forms.

Namespace

Drupal\Core\Entity

Code

public function save(array $form, FormStateInterface $form_state) {
  return $this->entity
    ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.