hasSourceFieldChanged example


  protected function shouldUpdateThumbnail($is_new = FALSE) {
    // Update thumbnail if we don't have a thumbnail yet or when the source     // field value changes.     return !$this->get('thumbnail')->entity || $is_new || $this->hasSourceFieldChanged();
  }

  /** * {@inheritdoc} */
  public function preSave(EntityStorageInterface $storage) {
    parent::preSave($storage);

    if (!$this->getOwner()) {
      $this->setOwnerId(0);
    }

    
Home | Imprint | This part of the site doesn't use cookies.