diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php index 334d2cb..e6c835b 100644 --- a/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php +++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php @@ -99,6 +99,30 @@ public function __construct(array $values, $entity_type) { } /** + * Overrides Drupal\config\ConfigEntityBase::set(). + * + * Special handling for setting the breakpoints property so we always load the + * breakpoint entities during ConfigStorageController::importChange. + * + * @see BreakpointGroup::save(). + */ + public function set($property_name, $value, $langcode = NULL) { + if ($property_name == 'breakpoints') { + if (is_array($value)) { + foreach ($value as $value_item) { + if (is_string($value_item)) { + $this->addBreakpoints($value); + } + break; + } + } + } + else { + parent::set($property_name, $value, $langcode); + } + } + + /** * Overrides Drupal\Core\Entity\Entity::save(). */ public function save() {