You are here

public static function EntityUpdateTestHelper::getConfig in Entity Update 2.0.x

Same name and namespace in other branches
  1. 8 modules/entity_update_tests/src/EntityUpdateTestHelper.php \Drupal\entity_update_tests\EntityUpdateTestHelper::getConfig()

Get Configuration Object.

Parameters

bool $editable: Readonly or Editable.

Return value

\Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig The configuration object.

2 calls to EntityUpdateTestHelper::getConfig()
EntityUpdateTestHelper::fieldEnable in tests/modules/entity_update_tests/src/EntityUpdateTestHelper.php
Enable a configurable field.
EntityUpdateTestHelper::fieldSetType in tests/modules/entity_update_tests/src/EntityUpdateTestHelper.php
Set Field type.

File

tests/modules/entity_update_tests/src/EntityUpdateTestHelper.php, line 28

Class

EntityUpdateTestHelper
EntityUpdateTest Helper functions.

Namespace

Drupal\entity_update_tests

Code

public static function getConfig($editable = FALSE) {
  if ($editable) {
    $config = \Drupal::configFactory()
      ->getEditable(static::getConfigName());
  }
  else {
    $config = \Drupal::config(static::getConfigName());
  }
  return $config;
}