EntityDataDefinitionInterface.php

Same filename and directory in other branches
  1. 11.x core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php
  2. 10 core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php
  3. 9 core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php

Namespace

Drupal\Core\Entity\TypedData

File

core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php

View source
<?php

namespace Drupal\Core\Entity\TypedData;

use Drupal\Core\TypedData\ComplexDataDefinitionInterface;

/**
 * Interface for typed data entity definitions.
 */
interface EntityDataDefinitionInterface extends ComplexDataDefinitionInterface {
  
  /**
   * Gets the entity type ID.
   *
   * @return string|null
   *   The entity type ID, or NULL if the entity type is unknown.
   */
  public function getEntityTypeId();
  
  /**
   * Sets the entity type ID.
   *
   * @param string $entity_type_id
   *   The entity type to set.
   *
   * @return $this
   */
  public function setEntityTypeId($entity_type_id);
  
  /**
   * Gets the array of possible entity bundles.
   *
   * @return array|null
   *   The array of possible bundles, or NULL for any.
   */
  public function getBundles();
  
  /**
   * Sets the array of possible entity bundles.
   *
   * @param array|null $bundles
   *   The array of possible bundles, or NULL for any.
   *
   * @return $this
   */
  public function setBundles(array $bundles = NULL);

}

Interfaces

Title Deprecated Summary
EntityDataDefinitionInterface Interface for typed data entity definitions.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.