You are here

public function RelationForm::form in Relation 8

Same name and namespace in other branches
  1. 8.2 src/RelationForm.php \Drupal\relation\RelationForm::form()

Gets the actual form array to be built.

Overrides ContentEntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/RelationForm.php, line 39
Definition of Drupal\relation\RelationForm.

Class

RelationForm
Form for relation edit.

Namespace

Drupal\relation

Code

public function form(array $form, FormStateInterface $form_state) {
  $relation = $this
    ->getEntity();
  if ($this->operation == 'edit') {
    $form['#title'] = t('<em>Editing</em> @label', array(
      '@label' => $relation
        ->label(),
    ));
  }
  return parent::form($form, $form_state, $relation);
}