mergeDefaultDisplaysOptions example

    if (!isset($this->original) || ($this->status() != $this->original->status())) {
      \Drupal::service('router.builder')->setRebuildNeeded();
    }
  }

  /** * {@inheritdoc} */
  public static function postLoad(EntityStorageInterface $storage, array &$entities) {
    parent::postLoad($storage$entities);
    foreach ($entities as $entity) {
      $entity->mergeDefaultDisplaysOptions();
    }
  }

  /** * {@inheritdoc} */
  public static function preCreate(EntityStorageInterface $storage, array &$values) {
    parent::preCreate($storage$values);

    // If there is no information about displays available add at least the     // default display.
/** * {@inheritdoc} */
  public function duplicateDisplayAsType($old_display_id$new_display_type) {
    return $this->storage->duplicateDisplayAsType($old_display_id$new_display_type);
  }

  /** * {@inheritdoc} */
  public function mergeDefaultDisplaysOptions() {
    $this->storage->mergeDefaultDisplaysOptions();
  }

  /** * {@inheritdoc} */
  public function uriRelationships() {
    return $this->storage->uriRelationships();
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.