Loading src/Service/BlockClassHelperService.php +9 −0 Original line number Diff line number Diff line Loading @@ -1093,6 +1093,14 @@ class BlockClassHelperService { } // Validate if key and value are populated. if (empty($attribute_key) || empty($attribute_value)) { $form_state->setErrorByName('multiple_attributes][third_party_settings][block_class][attribute_' . $index . '][attribute_key_' . $index, $this->t('To apply attribute is necessary put "key" and "value"')); return FALSE; } // Search by duplicated attributes. $attribute_already_exists = array_search($attribute_key, $attribute_keys); Loading Loading @@ -1293,6 +1301,7 @@ class BlockClassHelperService { unset($multiple_items['add_another_item']); unset($multiple_items['remove_item']); unset($multiple_items['attributes']); unset($multiple_items['multiple_attributes']); unset($multiple_items['classes']); // Run a foreach in all items. Loading Loading
src/Service/BlockClassHelperService.php +9 −0 Original line number Diff line number Diff line Loading @@ -1093,6 +1093,14 @@ class BlockClassHelperService { } // Validate if key and value are populated. if (empty($attribute_key) || empty($attribute_value)) { $form_state->setErrorByName('multiple_attributes][third_party_settings][block_class][attribute_' . $index . '][attribute_key_' . $index, $this->t('To apply attribute is necessary put "key" and "value"')); return FALSE; } // Search by duplicated attributes. $attribute_already_exists = array_search($attribute_key, $attribute_keys); Loading Loading @@ -1293,6 +1301,7 @@ class BlockClassHelperService { unset($multiple_items['add_another_item']); unset($multiple_items['remove_item']); unset($multiple_items['attributes']); unset($multiple_items['multiple_attributes']); unset($multiple_items['classes']); // Run a foreach in all items. Loading