You are here

public static function ConfigName::createByTypeName in Update helper 2.x

Same name and namespace in other branches
  1. 8 src/ConfigName.php \Drupal\update_helper\ConfigName::createByTypeName()

Create ConfigName instance from configuration type and name.

Parameters

string $config_type: Config type.

string $config_name: Config name.

Return value

ConfigName Return instance of ConfigName.

1 call to ConfigName::createByTypeName()
ConfigNameTest::testCreateByTypeName in tests/src/Kernel/ConfigNameTest.php
Test creation of class by type and name.

File

src/ConfigName.php, line 66

Class

ConfigName
Configuration name class for easier handling of configuration references.

Namespace

Drupal\update_helper

Code

public static function createByTypeName($config_type, $config_name) {
  $config_name_instance = new static();
  $config_name_instance->type = $config_type;
  $config_name_instance->name = $config_name;
  return $config_name_instance;
}