public function QueueInterface::createItem

Adds a queue item and store it directly to the queue.

Parameters

$data: Arbitrary data to be associated with the new task in the queue.

Return value

TRUE if the item was successfully created and was (best effort) added to the queue, otherwise FALSE. We don't guarantee the item was committed to disk etc, but as far as we know, the item is now in the queue.

2 methods override QueueInterface::createItem()
Memory::createItem in drupal/core/lib/Drupal/Core/Queue/Memory.php
Implements Drupal\Core\Queue\QueueInterface::createItem().
System::createItem in drupal/core/lib/Drupal/Core/Queue/System.php
Implements Drupal\Core\Queue\QueueInterface::createItem().

File

drupal/core/lib/Drupal/Core/Queue/QueueInterface.php, line 30
Definition of Drupal\Core\Queue\QueueInterface.

Class

QueueInterface
Interface for a queue.

Namespace

Drupal\Core\Queue

Code

public function createItem($data);