You are here

public function EditableFieldsForm::setDefaults in Editable Fields 1.0.x

Same name and namespace in other branches
  1. 8 src/Form/EditableFieldsForm.php \Drupal\editablefields\Form\EditableFieldsForm::setDefaults()

Set defaults to be used for unique form ID.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Edited entity.

$field_name: Field name.

$form_mode: Form mode.

File

src/Form/EditableFieldsForm.php, line 191

Class

EditableFieldsForm
Class EditableFieldsForm.

Namespace

Drupal\editablefields\Form

Code

public function setDefaults(EntityInterface $entity, $field_name, $form_mode = 'default') {
  $this->entity = $entity;
  $this->field_name = $field_name;
  $this->form_mode = $form_mode;
}