public function EntityUsageInterface::add in Entity Usage 8
Records that an entity is referencing another entity.
Examples:
- A node that references another node using an entityreference field.
Parameters
int $t_id: The identifier of the target entity.
string $t_type: The type of the target entity.
int $re_id: The identifier of the referencing entity.
string $re_type: The type of the entity that is referencing.
string $method: (optional) The method or way the two entities are being referenced. Defaults to 'entity_reference'.
int $count: (optional) The number of references to add to the object. Defaults to 1.
1 method overrides EntityUsageInterface::add()
- EntityUsage::add in src/
EntityUsage.php - Records that an entity is referencing another entity.
File
- src/
EntityUsageInterface.php, line 32
Class
- EntityUsageInterface
- Entity usage interface.
Namespace
Drupal\entity_usageCode
public function add($t_id, $t_type, $re_id, $re_type, $method = 'entity_reference', $count = 1);