getTypedDataClass example


  public function toArray() {
    return [];
  }

  /** * {@inheritdoc} */
  public function getTypedData() {
    if (!isset($this->typedData)) {
      $class = $this->getTypedDataClass();
      $this->typedData = $class::createFromEntity($this);
    }
    return $this->typedData;
  }

  /** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */
Home | Imprint | This part of the site doesn't use cookies.