protected function CerHandler::getRemoteEntityID in Corresponding Entity References 7.2
Get the ID of the remote entity. If the entity is of the wrong type, EntityMalformedException will be thrown.
Parameters
object $entity: The remote entity.
Return value
mixed The remote entity ID.
5 calls to CerHandler::getRemoteEntityID()
- CerHandler::addReferenceTo in ./handler.inc 
- Creates a reference to the remote entity on the local entity. Throws CerException if the local entity already references the remote entity, or if the field cannot hold any more values.
- CerHandler::dereference in ./handler.inc 
- Implements CerHandlerInterface::dereference().
- CerHandler::reference in ./handler.inc 
- Implements CerHandlerInterface::reference().
- CerHandler::referenceable in ./handler.inc 
- Implements CerHandlerInterface::referenceable().
- CerHandler::references in ./handler.inc 
- Implements CerHandlerInterface::references().
File
- ./handler.inc, line 376 
- Contains base code for CER handlers, which are objects responsible for creating, updating and deleting corresponding references between entities.
Class
- CerHandler
- @class Generic CER handler with rudimentary language handling.
Code
protected function getRemoteEntityID($entity) {
  $extract_ids = entity_extract_IDs($this->remote['entity_type'], $entity);
  return array_shift($extract_ids);
}