summaryrefslogtreecommitdiffstats
path: root/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-05-20 09:29:40 (GMT)
committerNathaniel Catchpole2014-05-20 09:29:40 (GMT)
commitc972b3ee9d6ef7d1554480ea95d0bcc623d01c77 (patch)
treecd99a0eb05894994a5612d59067cce0b3d7f361c /core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
parent21fbb5ddaffc925ed58f8086d0bf90e44845d4b3 (diff)
Issue #2190313 by pfrenssen, Berdir, amateescu, ianthomas_uk: Add $EntityType::load() and loadMultiple() to simplify loading entities.
Diffstat (limited to 'core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php')
-rw-r--r--core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
index c2426b7..02d6e29 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
@@ -157,7 +157,7 @@ class BreakpointGroup extends ConfigEntityBase implements BreakpointGroupInterfa
*/
public function addBreakpointFromMediaQuery($name, $media_query) {
// Use the existing breakpoint if it exists.
- $breakpoint = entity_load('breakpoint', $this->sourceType . '.' . $this->name . '.' . $name);
+ $breakpoint = Breakpoint::load($this->sourceType . '.' . $this->name . '.' . $name);
if (!$breakpoint) {
// Build a new breakpoint.
$breakpoint = entity_create('breakpoint', array(
@@ -191,7 +191,7 @@ class BreakpointGroup extends ConfigEntityBase implements BreakpointGroupInterfa
public function getBreakpoints() {
if (empty($this->breakpoints)) {
foreach ($this->breakpoint_ids as $breakpoint_id) {
- $breakpoint = breakpoint_load($breakpoint_id);
+ $breakpoint = Breakpoint::load($breakpoint_id);
if ($breakpoint) {
$this->breakpoints[$breakpoint_id] = $breakpoint;
}