public function PictureMapping::save

Overrides Drupal\Core\Entity::save().

Overrides Entity::save

File

drupal/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php, line 90
Definition of Drupal\picture\PictureMapping.

Class

PictureMapping
Defines the Picture entity.

Namespace

Drupal\picture\Plugin\Core\Entity

Code

public function save() {

  // Only save the keys, but return the full objects.
  if (isset($this->breakpointGroup) && is_object($this->breakpointGroup)) {
    $this->breakpointGroup = $this->breakpointGroup
      ->id();
  }
  parent::save();
  $this
    ->loadBreakpointGroup();
  $this
    ->loadAllMappings();
}