You are here

public function ExampleFormEventSubscribers::alterNodeForm in Hook Event Dispatcher 8

Alter node form.

Parameters

\Drupal\hook_event_dispatcher\Event\Form\FormBaseAlterEvent $event: The event.

File

src/Example/ExampleFormEventSubscribers.php, line 59

Class

ExampleFormEventSubscribers
Class ExampleFormEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public function alterNodeForm(FormBaseAlterEvent $event) {
  $form =& $event
    ->getForm();
  $form['title']['widget'][0]['value']['#title'] = 'A new title!';
}