You are here

protected function ReadOnlyFormSubscriber::getEditableConfigNames in Configuration Read-only mode 8

Get the editable configuration names.

Parameters

\Drupal\Core\Form\ConfigFormBase $form: The configuration form.

Return value

array An array of configuration object names that are editable if called in conjunction with the trait's config() method.

See also

\Drupal\Core\Form\ConfigFormBaseTrait::getEditableConfigNames()

1 call to ReadOnlyFormSubscriber::getEditableConfigNames()
ReadOnlyFormSubscriber::onFormAlter in src/EventSubscriber/ReadOnlyFormSubscriber.php

File

src/EventSubscriber/ReadOnlyFormSubscriber.php, line 106

Class

ReadOnlyFormSubscriber
Check if the given form should be read-only.

Namespace

Drupal\config_readonly\EventSubscriber

Code

protected function getEditableConfigNames(ConfigFormBase $form) {

  // Use reflection to work around getEditableConfigNames() as protected.
  // @todo Review in 9.x for API change.
  // @see https://www.drupal.org/node/2095289
  $reflection = new \ReflectionMethod(get_class($form), 'getEditableConfigNames');
  $reflection
    ->setAccessible(TRUE);
  return $reflection
    ->invoke($form);
}