class i18n_block_object in Internationalization 7
Block object
Hierarchy
- class \i18n_object_wrapper
- class \i18n_string_object_wrapper
- class \i18n_block_object
- class \i18n_string_object_wrapper
Expanded class hierarchy of i18n_block_object
1 string reference to 'i18n_block_object'
- i18n_block_i18n_object_info in i18n_block/
i18n_block.i18n.inc - Implements hook_i18n_object_info().
File
- i18n_block/
i18n_block.inc, line 9
View source
class i18n_block_object extends i18n_string_object_wrapper {
/**
* Load a block object.
*
* @param $object
* An array with module and delta.
*/
function load_object($object) {
$this->object = call_user_func_array($this
->get_info('load callback'), $object);
return $this
->get_object();
}
/**
* Get base keys for translating this object
*/
public function get_string_context() {
return array(
$this->object->module,
$this->object->delta,
);
}
/**
* Get object strings for translation
*/
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;
}
/**
* Translation mode for object
*/
public function get_translate_mode() {
return !empty($this->object->i18n_mode) ? I18N_MODE_LOCALIZE : I18N_MODE_NONE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
i18n_block_object:: |
protected | function |
Get object strings for translation Overrides i18n_string_object_wrapper:: |
|
i18n_block_object:: |
public | function |
Get base keys for translating this object Overrides i18n_string_object_wrapper:: |
|
i18n_block_object:: |
public | function |
Translation mode for object Overrides i18n_string_object_wrapper:: |
|
i18n_block_object:: |
function |
Load a block object. Overrides i18n_object_wrapper:: |
||
i18n_object_wrapper:: |
protected | property | ||
i18n_object_wrapper:: |
protected | property | ||
i18n_object_wrapper:: |
protected | property | ||
i18n_object_wrapper:: |
protected | property | ||
i18n_object_wrapper:: |
function | Get edit path for object | 2 | |
i18n_object_wrapper:: |
function | Get field value from object/array | ||
i18n_object_wrapper:: |
function | Get string numeric key for indexing. | ||
i18n_object_wrapper:: |
public | function | Get object info | |
i18n_object_wrapper:: |
function | Get key value from object/array | ||
i18n_object_wrapper:: |
public | function | Get language code | |
i18n_object_wrapper:: |
public | function | Get real object or array. | |
i18n_object_wrapper:: |
public | function | Get link for item | 2 |
i18n_object_wrapper:: |
protected | function | Get menu placehoders for object | |
i18n_object_wrapper:: |
public | function | Get object string translation info | |
i18n_object_wrapper:: |
public | function | Get title from item | 2 |
i18n_object_wrapper:: |
function | Menu access callback for mixed translation tab | ||
i18n_object_wrapper:: |
public | function | Get object translation set info | |
i18n_object_wrapper:: |
function | Get translation set id if any | ||
i18n_object_wrapper:: |
public | function | Get object type | |
i18n_object_wrapper:: |
function | Localize object if localizable. | ||
i18n_object_wrapper:: |
protected | function | Replace path with placeholders | |
i18n_object_wrapper:: |
function | Set field value to object/array | ||
i18n_object_wrapper:: |
function | Set translation set id | ||
i18n_object_wrapper:: |
protected | function | Translate access (translation sets) | 2 |
i18n_object_wrapper:: |
public | function | Class constructor | 2 |
i18n_string_object_wrapper:: |
protected | property | ||
i18n_string_object_wrapper:: |
protected | property | ||
i18n_string_object_wrapper:: |
public | function | Get object translatable properties | |
i18n_string_object_wrapper:: |
public | function | Get object strings for translation | |
i18n_string_object_wrapper:: |
public | function | Get textgroup name | |
i18n_string_object_wrapper:: |
protected | function | Context to be pre-loaded before translation. | 2 |
i18n_string_object_wrapper:: |
public | function | Get translate path for object | 2 |
i18n_string_object_wrapper:: |
public | function | Load all existing strings for this object. | |
i18n_string_object_wrapper:: |
protected | function |
Translate access (localize strings) Overrides i18n_object_wrapper:: |
|
i18n_string_object_wrapper:: |
public | function | Remove all strings for this object. | |
i18n_string_object_wrapper:: |
public | function | Update all strings for this object. | |
i18n_string_object_wrapper:: |
protected | function | Get textgroup object | |
i18n_string_object_wrapper:: |
public | function |
Translate object. Overrides i18n_object_wrapper:: |
|
i18n_string_object_wrapper:: |
protected | function | Translate object property. | 2 |
i18n_string_object_wrapper:: |
protected | function | Translate all properties for object. |