You are here

protected function GroupPermissionsForm::getInfo in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/GroupPermissionsForm.php \Drupal\group\Form\GroupPermissionsForm::getInfo()

Gets a few basic instructions to show the user.

Return value

array A render array to display atop the form.

2 calls to GroupPermissionsForm::getInfo()
GroupPermissionsForm::buildForm in src/Form/GroupPermissionsForm.php
Form constructor.
GroupPermissionsTypeSpecificForm::getInfo in src/Form/GroupPermissionsTypeSpecificForm.php
Gets a few basic instructions to show the user.
1 method overrides GroupPermissionsForm::getInfo()
GroupPermissionsTypeSpecificForm::getInfo in src/Form/GroupPermissionsTypeSpecificForm.php
Gets a few basic instructions to show the user.

File

src/Form/GroupPermissionsForm.php, line 67

Class

GroupPermissionsForm
Provides the group permissions administration form.

Namespace

Drupal\group\Form

Code

protected function getInfo() {

  // Format a message explaining the cells with a red x inside them.
  $replace = [
    '@red_dash' => new FormattableMarkup('<span style="color: #ff0000;">-</span>', []),
  ];
  $message = $this
    ->t('Cells with a @red_dash indicate that the permission is not available for that role.', $replace);

  // We use FormattableMarkup so the 'style' attribute doesn't get escaped.
  return [
    'red_dash_info' => [
      '#markup' => new FormattableMarkup("<p>{$message}</p>", []),
    ],
  ];
}