diff -u b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieBase.php b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieBase.php --- b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieBase.php +++ b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieBase.php @@ -56,21 +56,34 @@ } /** - * Implements Drupal\Core\ConfigThingie\ConfigThingieInterface::getConfigPrefix(). + * Returns the configuration thingie object's name prefix. + * + * @return string + * The configuration object name prefix; e.g., for a 'node.type.article' + * thingie, this returns 'node.type'. */ - public function getConfigPrefix() { - return 'config_test.dynamic'; - } + abstract public function getConfigPrefix(); /** - * Implements Drupal\Core\ConfigThingie\ConfigThingieInterface::getConfigName(). + * Returns the fully qualified configuration object name for this configuration thingie. + * + * @return string + * The configuration object name for this configuration thingie. Normally, + * ConfigThingieInterface::getConfigPrefix() and + * ConfigThingieInterface::getID() form the full configuration object name; + * i.e., '[prefix].[id]'. */ public function getConfigName() { return $this->getConfigPrefix() . '.' . $this->getID(); } /** - * Implements Drupal\Core\ConfigThingie\ConfigThingieInterface::getEventBasename(). + * Returns the basename used for events/hooks for this configuration thingie. + * + * @return string + * The basename for events/hooks; e.g., for a 'node.type.article' thingie, + * this returns 'node_type'. Normally, this is auto-generated based on + * ConfigThingieInterface::getConfigPrefix(). */ public function getEventBasename() { return str_replace('.', '_', $this->getConfigPrefix()); diff -u b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieInterface.php b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieInterface.php --- b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieInterface.php +++ b/core/lib/Drupal/Core/ConfigThingie/ConfigThingieInterface.php @@ -14,36 +14,6 @@ */ interface ConfigThingieInterface { /** - * Returns the configuration thingie object's name prefix. - * - * @return string - * The configuration object name prefix; e.g., for a 'node.type.article' - * thingie, this returns 'node.type'. - */ - public function getConfigPrefix(); - - /** - * Returns the fully qualified configuration object name for this configuration thingie. - * - * @return string - * The configuration object name for this configuration thingie. Normally, - * ConfigThingieInterface::getConfigPrefix() and - * ConfigThingieInterface::getID() form the full configuration object name; - * i.e., '[prefix].[id]'. - */ - public function getConfigName(); - - /** - * Returns the basename used for events/hooks for this configuration thingie. - * - * @return string - * The basename for events/hooks; e.g., for a 'node.type.article' thingie, - * this returns 'node_type'. Normally, this is auto-generated based on - * ConfigThingieInterface::getConfigPrefix(). - */ - public function getEventBasename(); - - /** * Returns the ID (machine name) of this configuration thingie. * * @return string only in patch2: --- a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php @@ -46,5 +46,14 @@ class ConfigInstallTest extends WebTestBase { // Verify that configuration import callback was invoked for the dynamic // thingie. $this->assertTrue($GLOBALS['hook_config_import']); + + // Verify that config_test API hooks were invoked for the dynamic default + // thingie. + $this->assertTrue(isset($GLOBALS['hook_config_test_dynamic']['load'])); + $this->assertTrue(isset($GLOBALS['hook_config_test_dynamic']['presave'])); + $this->assertTrue(isset($GLOBALS['hook_config_test_dynamic']['insert'])); + $this->assertFalse(isset($GLOBALS['hook_config_test_dynamic']['update'])); + $this->assertFalse(isset($GLOBALS['hook_config_test_dynamic']['predelete'])); + $this->assertFalse(isset($GLOBALS['hook_config_test_dynamic']['delete'])); } }