You are here

public function EntityReference_SelectionHandler_EntityQueue::validateReferencableEntities in Entityqueue 7

Implements EntityReferenceHandler::validateReferencableEntities().

Overrides EntityReference_SelectionHandler_Generic::validateReferencableEntities

File

plugins/entityreference/selection/EntityReference_SelectionHandler_EntityQueue.class.php, line 97
Definition of EntityReference_SelectionHandler_EntityQueue.

Class

EntityReference_SelectionHandler_EntityQueue
Defines a Entityreference selection handler for Entityqueue.

Code

public function validateReferencableEntities(array $ids) {
  $referencable = parent::validateReferencableEntities($ids);

  // Allow users to save the queue even if they don't have access to an
  // existing entity in the queue. See https://www.drupal.org/node/2383903
  $existing = $this
    ->getCurrentlyReferencedEntityIds();
  return array_unique(array_merge($referencable, $existing));
}