public function CustomAccess::buildAdminForm in Field Permissions 8
Same name and namespace in other branches
- 8.2 src/Plugin/FieldPermissionType/CustomAccess.php \Drupal\field_permissions\Plugin\FieldPermissionType\CustomAccess::buildAdminForm()
Build or alter the field admin form.
Parameters
array $form: The form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state object.
\Drupal\user\RoleStorageInterface $role_storage: The user role storage.
Overrides AdminFormSettingsInterface::buildAdminForm
File
- src/
Plugin/ FieldPermissionType/ CustomAccess.php, line 66
Class
- CustomAccess
- Defines custom access for fields.
Namespace
Drupal\field_permissions\Plugin\FieldPermissionTypeCode
public function buildAdminForm(array &$form, FormStateInterface $form_state, RoleStorageInterface $role_storage) {
$this
->addPermissionsGrid($form, $form_state, $role_storage);
// Only display the permissions matrix if this type is selected.
$form['#attached']['library'][] = 'field_permissions/field_permissions';
}