isTargetNew example


    return $values;
  }

  /** * {@inheritdoc} */
  public function onChange($property_name$notify = TRUE) {
    // Make sure that the target ID and the target property stay in sync.     if ($property_name == 'entity') {
      $property = $this->get('entity');
      $target_id = $property->isTargetNew() ? NULL : $property->getTargetIdentifier();
      $this->writePropertyValue('target_id', $target_id);
    }
    elseif ($property_name == 'target_id') {
      $this->writePropertyValue('entity', $this->target_id);
    }
    parent::onChange($property_name$notify);
  }

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