Loading src/Service/BlockClassHelperService.php +40 −31 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ class BlockClassHelperService { // Get the block class. $block_classes = $entity->getThirdPartySetting('block_class', 'classes'); $attributes = $entity->getThirdPartySetting('block_class', 'attributes'); // Only process non-empty values. if (!empty($block_classes)) { switch ($default_case) { Loading Loading @@ -200,7 +201,7 @@ class BlockClassHelperService { $current_block_classes = array_combine($current_block_classes, $current_block_classes); // Merge with the current one. $block_classes_to_store = array_merge($current_block_classes, $current_block_classes); $block_classes_to_store = array_merge($block_classes_stored, $current_block_classes); // Get as JSON. $block_classes_to_store = Json::encode($block_classes_to_store); Loading @@ -208,6 +209,11 @@ class BlockClassHelperService { // Store in the config. $config->set('block_classes_stored', $block_classes_to_store); // Save. $config->save(); } // Store the id replacement in the settings only if it is enabled in the // Global Settings page. if (!empty($config->get('enable_id_replacement'))) { Loading Loading @@ -249,6 +255,9 @@ class BlockClassHelperService { return FALSE; } // Get the current attributes. $attributes = $entity->getThirdPartySetting('block_class', 'attributes'); // Initial value. $attribute_keys_stored = '{}'; Loading Loading
src/Service/BlockClassHelperService.php +40 −31 Original line number Diff line number Diff line Loading @@ -158,7 +158,8 @@ class BlockClassHelperService { // Get the block class. $block_classes = $entity->getThirdPartySetting('block_class', 'classes'); $attributes = $entity->getThirdPartySetting('block_class', 'attributes'); // Only process non-empty values. if (!empty($block_classes)) { switch ($default_case) { Loading Loading @@ -200,7 +201,7 @@ class BlockClassHelperService { $current_block_classes = array_combine($current_block_classes, $current_block_classes); // Merge with the current one. $block_classes_to_store = array_merge($current_block_classes, $current_block_classes); $block_classes_to_store = array_merge($block_classes_stored, $current_block_classes); // Get as JSON. $block_classes_to_store = Json::encode($block_classes_to_store); Loading @@ -208,6 +209,11 @@ class BlockClassHelperService { // Store in the config. $config->set('block_classes_stored', $block_classes_to_store); // Save. $config->save(); } // Store the id replacement in the settings only if it is enabled in the // Global Settings page. if (!empty($config->get('enable_id_replacement'))) { Loading Loading @@ -249,6 +255,9 @@ class BlockClassHelperService { return FALSE; } // Get the current attributes. $attributes = $entity->getThirdPartySetting('block_class', 'attributes'); // Initial value. $attribute_keys_stored = '{}'; Loading