Loading core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php +2 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ protected function getDerivatives(array $base_plugin_definitions) { * * @return array * An array with the base plugin id as the first index and the derivative id * as the second. If there is no derivative id it will be null. * as the second. If there is no derivative id it will be an empty string. */ protected function decodePluginId($plugin_id) { // Try and split the passed plugin definition into a plugin and a Loading @@ -137,7 +137,7 @@ protected function decodePluginId($plugin_id) { return explode(':', $plugin_id, 2); } return [$plugin_id, NULL]; return [$plugin_id, '']; } /** Loading core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php +4 −4 Original line number Diff line number Diff line Loading @@ -38,10 +38,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { unset($base_plugin_definition['deriver']); $derivatives = [ // Adding a NULL key signifies that the base plugin may also be used in // addition to the derivatives. In this case, we allow the administrator // to add a generic layout block to the page. NULL => $base_plugin_definition, // Adding an empty string key signifies that the base plugin may also be // used in addition to the derivatives. In this case, we allow the // administrator to add a generic layout block to the page. '' => $base_plugin_definition, // We also allow them to add a customized one. Here, we just mock the // customized one, but in a real implementation, this would be fetched Loading Loading
core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php +2 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ protected function getDerivatives(array $base_plugin_definitions) { * * @return array * An array with the base plugin id as the first index and the derivative id * as the second. If there is no derivative id it will be null. * as the second. If there is no derivative id it will be an empty string. */ protected function decodePluginId($plugin_id) { // Try and split the passed plugin definition into a plugin and a Loading @@ -137,7 +137,7 @@ protected function decodePluginId($plugin_id) { return explode(':', $plugin_id, 2); } return [$plugin_id, NULL]; return [$plugin_id, '']; } /** Loading
core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php +4 −4 Original line number Diff line number Diff line Loading @@ -38,10 +38,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { unset($base_plugin_definition['deriver']); $derivatives = [ // Adding a NULL key signifies that the base plugin may also be used in // addition to the derivatives. In this case, we allow the administrator // to add a generic layout block to the page. NULL => $base_plugin_definition, // Adding an empty string key signifies that the base plugin may also be // used in addition to the derivatives. In this case, we allow the // administrator to add a generic layout block to the page. '' => $base_plugin_definition, // We also allow them to add a customized one. Here, we just mock the // customized one, but in a real implementation, this would be fetched Loading