Entity::loadMultiple

public static Entity::loadMultiple(array $ids = NULL) Loads one or more entities. Parameters array $ids: An array of entity IDs, or NULL to load all entities. Return value static[] An array of entity objects indexed by their IDs. Overrides EntityInterface::loadMultiple File core/lib/Drupal/Core/Entity/Entity.php, line 505 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public static function loadMultiple(array $ids = NULL) { $entity_manager = \Drupal::en

Entity::load

public static Entity::load($id) Loads an entity. Parameters mixed $id: The id of the entity to load. Return value static The entity object or NULL if there is no entity with the given ID. Overrides EntityInterface::load File core/lib/Drupal/Core/Entity/Entity.php, line 497 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public static function load($id) { $entity_manager = \Drupal::entityManager(); return $entity_manager->getStorage($entity_manager-&

Entity::linkTemplates

protected Entity::linkTemplates() Gets an array link templates. Return value array An array of link templates containing paths. File core/lib/Drupal/Core/Entity/Entity.php, line 251 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code protected function linkTemplates() { return $this->getEntityType()->getLinkTemplates(); }

Entity::link

public Entity::link($text = NULL, $rel = 'canonical', array $options = []) Deprecated way of generating a link to the entity. See toLink(). Parameters string|null $text: (optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL. string $rel: (optional) The link relationship type. Defaults to 'canonical'. array $options: See \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for the available options. Return value

Entity::languageManager

protected Entity::languageManager() Gets the language manager. Return value \Drupal\Core\Language\LanguageManagerInterface File core/lib/Drupal/Core/Entity/Entity.php, line 95 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code protected function languageManager() { return \Drupal::languageManager(); }

Entity::language

public Entity::language() Gets the language of the entity. Return value \Drupal\Core\Language\LanguageInterface The language object. Overrides EntityInterface::language File core/lib/Drupal/Core/Entity/Entity.php, line 346 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function language() { if ($key = $this->getEntityType()->getKey('langcode')) { $langcode = $this->$key; $language = $this->languageManager()->getLanguage($lan

Entity::label

public Entity::label() Gets the label of the entity. Return value string|null The label of the entity, or NULL if there is no label defined. Overrides EntityInterface::label File core/lib/Drupal/Core/Entity/Entity.php, line 155 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function label() { $label = NULL; $entity_type = $this->getEntityType(); if (($label_callback = $entity_type->getLabelCallback()) && is_callable($label_callba

Entity::isNew

public Entity::isNew() Determines whether the entity is new. Usually an entity is new if no ID exists for it yet. However, entities may be enforced to be new with existing IDs too. Return value bool TRUE if the entity is new, or FALSE if the entity has already been saved. Overrides EntityInterface::isNew See also \Drupal\Core\Entity\EntityInterface::enforceIsNew() File core/lib/Drupal/Core/Entity/Entity.php, line 125 Class Entity Defines a base entity class. Namespace Drupal\Core\Enti

Entity::invalidateTagsOnSave

protected Entity::invalidateTagsOnSave($update) Invalidates an entity's cache tags upon save. Parameters bool $update: TRUE if the entity has been updated, or FALSE if it has been inserted. File core/lib/Drupal/Core/Entity/Entity.php, line 524 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code protected function invalidateTagsOnSave($update) { // An entity was created or updated: invalidate its list cache tags. (An // updated entity may start to appear in

Entity::invalidateTagsOnDelete

protected static Entity::invalidateTagsOnDelete(EntityTypeInterface $entity_type, array $entities) Invalidates an entity's cache tags upon delete. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. \Drupal\Core\Entity\EntityInterface[] $entities: An array of entities. File core/lib/Drupal/Core/Entity/Entity.php, line 549 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code protected static function invalidateTagsOnDelete