ModulesListExperimentalConfirmForm::buildMessageList

protected ModulesListExperimentalConfirmForm::buildMessageList()

Builds the message list for the confirmation form.

Return value

\Drupal\Component\Render\MarkupInterface[] Array of markup for the list of messages on the form.

Overrides ModulesListConfirmForm::buildMessageList

See also

\Drupal\system\Form\ModulesListForm::buildModuleList()

File

core/modules/system/src/Form/ModulesListExperimentalConfirmForm.php, line 27

Class

ModulesListExperimentalConfirmForm
Builds a confirmation form for enabling experimental modules.

Namespace

Drupal\system\Form

Code

protected function buildMessageList() {
  drupal_set_message($this->t('<a href=":url">Experimental modules</a> are provided for testing purposes only. Use at your own risk.', [':url' => 'https://www.drupal.org/core/experimental']), 'warning');

  $items = parent::buildMessageList();
  // Add the list of experimental modules after any other messages.
  $items[] = $this->t('The following modules are experimental: @modules', ['@modules' => implode(', ', array_values($this->modules['experimental']))]);

  return $items;
}
doc_Drupal
2016-10-29 09:29:34
Comments
Leave a Comment

Please login to continue.