You are here

protected function MediaDirectoriesController::addMessagesToForm in Media Directories 2.x

Same name and namespace in other branches
  1. 8 modules/media_directories_ui/src/Controller/MediaDirectoriesController.php \Drupal\media_directories_ui\Controller\MediaDirectoriesController::addMessagesToForm()

Adds the current status messages on top of a form.

Parameters

array $form: A from.

2 calls to MediaDirectoriesController::addMessagesToForm()
MediaDirectoriesController::mediaDelete in modules/media_directories_ui/src/Controller/MediaDirectoriesController.php
Media entity delete confirmation form.
MediaDirectoriesController::mediaEdit in modules/media_directories_ui/src/Controller/MediaDirectoriesController.php
Media entity edit form.

File

modules/media_directories_ui/src/Controller/MediaDirectoriesController.php, line 641

Class

MediaDirectoriesController
Main controller class.

Namespace

Drupal\media_directories_ui\Controller

Code

protected function addMessagesToForm(array $form) {
  $form['messages']['status'] = [
    '#type' => 'status_messages',
    '#weight' => -100,
  ];
}