public function EntitySubqueue::addItem in Entityqueue 8
Adds an entity to a subqueue.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: An entity object.
Return value
$this
Overrides EntitySubqueueInterface::addItem
File
- src/
Entity/ EntitySubqueue.php, line 279
Class
- EntitySubqueue
- Defines the EntitySubqueue entity class.
Namespace
Drupal\entityqueue\EntityCode
public function addItem(EntityInterface $entity) {
$this
->get('items')
->appendItem($entity
->id());
return $this;
}