Created
March 9, 2013 05:52
-
-
Save kimpepper/5122846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment