You are here

public function UcAddressesEntityController::load in Ubercart Addresses 7

Implements DrupalEntityControllerInterface::load().

Return value

array An array of entities.

Overrides EntityAPIController::load

1 call to UcAddressesEntityController::load()
UcAddressesEntityController::delete in class/uc_addresses.entity.inc
Implements EntityAPIControllerInterface::delete().

File

class/uc_addresses.entity.inc, line 18
Entity integration code.

Class

UcAddressesEntityController
Ubercart Addresses entity controller class.

Code

public function load($ids = array(), $conditions = array()) {
  $entities = array();
  if (!empty($this->entityInfo['entity class'])) {
    $class = $this->entityInfo['entity class'];
  }
  else {
    throw new UcAddressesException('There is no entity class specified for the uc_addresses entity.');
  }
  foreach ($ids as $id) {
    $address = UcAddressesAddressBook::loadAddress($id);
    if ($address) {
      $entities[$id] = $address;
    }
  }
  return $entities;
}