You are here

function i18n_object_wrapper::load_object in Internationalization 7

Load real object or array.

Parameters

$object:

1 call to i18n_object_wrapper::load_object()
i18n_object_wrapper::__construct in ./i18n_object.inc
Class constructor
1 method overrides i18n_object_wrapper::load_object()
i18n_block_object::load_object in i18n_block/i18n_block.inc
Load a block object.

File

./i18n_object.inc, line 92
i18n Object Class

Class

i18n_object_wrapper
Object wrapper

Code

function load_object($object) {
  if ($callback = $this
    ->get_info('load callback', NULL)) {
    $this->object = call_user_func($callback, $object);
  }
  elseif ($entity_type = $this
    ->get_info('entity', NULL)) {
    $entity = entity_load($entity_type, array(
      $object,
    ));
    $this->object = $entity ? reset($entity) : FALSE;
  }
  return $this
    ->get_object();
}