You are here

protected function i18n_block_object::build_properties in Internationalization 7

Get object strings for translation

Overrides i18n_string_object_wrapper::build_properties

File

i18n_block/i18n_block.inc, line 32

Class

i18n_block_object
Block object

Code

protected function build_properties() {
  if ($this->object->module == 'block' && !isset($this->object->body)) {
    $block = (object) block_custom_block_get($this->object->delta);
    $this->object->body = $block->body;
    $this->object->format = $block->format;
  }
  $properties = parent::build_properties();

  // Body is available only for custom blocks.
  if ($this->object->module != 'block') {
    unset($properties[$this
      ->get_textgroup()][$this->object->module][$this->object->delta]['body']);
  }
  return $properties;
}