You are here

public function EntitySubqueue::shuffleItems in Entityqueue 8

Shuffles the items of this subqueue.

Return value

$this

Overrides EntitySubqueueInterface::shuffleItems

File

src/Entity/EntitySubqueue.php, line 326

Class

EntitySubqueue
Defines the EntitySubqueue entity class.

Namespace

Drupal\entityqueue\Entity

Code

public function shuffleItems() {
  $subqueue_items = $this
    ->get('items')
    ->getValue();
  shuffle($subqueue_items);
  $this
    ->get('items')
    ->setValue($subqueue_items);
  return $this;
}