You are here

protected function ReverseSubqueueItems::doExecute in Entityqueue 8

Reverses the items of a subqueue.

Parameters

string $subqueue_id: The ID of the subqueue whose items will be reversed.

File

src/Plugin/RulesAction/ReverseSubqueueItems.php, line 31

Class

ReverseSubqueueItems
Provides a 'Reverse subqueue items' action.

Namespace

Drupal\entityqueue\Plugin\RulesAction

Code

protected function doExecute($subqueue_id) {

  /** @var \Drupal\entityqueue\EntitySubqueueInterface $subqueue */
  $subqueue = EntitySubqueue::load($subqueue_id);
  $subqueue
    ->reverseItems()
    ->save();
}