You are here

public function EntityReference_SelectionHandler_EntityQueue::getCurrentlyReferencedEntityIds in Entityqueue 7

Gets ids of existing entities in the queue.

Return value

array Entity ids that are currently referenced by the entity.

1 call to EntityReference_SelectionHandler_EntityQueue::getCurrentlyReferencedEntityIds()
EntityReference_SelectionHandler_EntityQueue::validateReferencableEntities in plugins/entityreference/selection/EntityReference_SelectionHandler_EntityQueue.class.php
Implements EntityReferenceHandler::validateReferencableEntities().

File

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

Class

EntityReference_SelectionHandler_EntityQueue
Defines a Entityreference selection handler for Entityqueue.

Code

public function getCurrentlyReferencedEntityIds() {
  $ret = array();
  if (isset($this->entity) && isset($this->field)) {
    $entity_type = $this->entity_type;
    $field_name = $this->field['field_name'];
    $wrapper = entity_metadata_wrapper($entity_type, $this->entity);
    $ret = $wrapper->{$field_name}
      ->raw();
  }
  return $ret;
}