public static function SchemeForm::tacLiteConfig in Taxonomy Access Control Lite 8
Helper function to get configuration of scheme.
7 calls to SchemeForm::tacLiteConfig()
- SchemeForm::buildForm in src/
Form/ SchemeForm.php - Form constructor.
- tac_lite_create_form_alter in tac_lite_create/
tac_lite_create.module - Implements hook_form_alter().
- tac_lite_node_access_records in ./
tac_lite.module - Implements hook_node_access_records().
- tac_lite_node_grants in ./
tac_lite.module - Implements hook_node_grants().
- tac_lite_query_term_access_alter in ./
tac_lite.module - Implements hook_query_TAG_alter().
File
- src/
Form/ SchemeForm.php, line 153
Class
- SchemeForm
- Builds the scheme configuration form.
Namespace
Drupal\tac_lite\FormCode
public static function tacLiteConfig($scheme) {
$settings = \Drupal::config('tac_lite.settings');
$config = $settings
->get('tac_lite_config_scheme_' . $scheme);
$config['name'] = !empty($config['name']) ? $config['name'] : NULL;
$config['perms'] = !empty($config['perms']) ? $config['perms'] : [];
$config += [
'term_visibility' => isset($config['perms']['grant_view']) && $config['perms']['grant_view'],
'unpublished' => FALSE,
'realm' => 'tac_lite_scheme_' . $scheme,
];
return $config;
}