public static function FPAFormBuilder::buildFPAPage in Fast Permissions Administration 3.0.x
Same name and namespace in other branches
- 8.2 src/FPAFormBuilder.php \Drupal\fpa\FPAFormBuilder::buildFPAPage()
Builds the FPA pages.
Return value
mixed Returns render array.
1 call to FPAFormBuilder::buildFPAPage()
- FPAController::permissionsList in src/
Controller/ FPAController.php - Builds a permissions page.
File
- src/
FPAFormBuilder.php, line 66
Class
- FPAFormBuilder
- Class FPAFormBuilder.
Namespace
Drupal\fpaCode
public static function buildFPAPage() {
$form = \Drupal::service('form_builder')
->getForm('\\Drupal\\user\\Form\\UserPermissionsForm');
$render = static::buildTable($form);
$render['#attached']['library'][] = 'fpa/fpa.permissions';
$render['#attached']['drupalSettings']['fpa'] = [
'attr' => [
'permission' => FPA_ATTR_PERMISSION,
'module' => FPA_ATTR_MODULE,
'role' => FPA_ATTR_ROLE,
'checked' => FPA_ATTR_CHECKED,
'not_checked' => FPA_ATTR_NOT_CHECKED,
'system_name' => FPA_ATTR_SYSTEM_NAME,
],
];
return $render;
}