function RulesI18nStringObjectWrapper::build_properties

Get translatable properties.

File

rules_i18n/rules_i18n.i18n.inc, line 48

Class

RulesI18nStringObjectWrapper
Custom I18nString object wrapper; registers custom properties per config.

Code

protected function build_properties() {
    $strings = parent::build_properties();
    $properties = array();
    // Also add in the configuration label, as the i18n String UI requires
    // a String to be available always.
    $properties['label'] = array(
        'title' => t('Configuration name'),
        'string' => $this->object->label,
    );
    $this->buildElementProperties($this->object, $properties);
    // Add in translations for all elements.
    foreach ($this->object
        ->elements() as $element) {
        $this->buildElementProperties($element, $properties);
    }
    $strings[$this->get_textgroup()]['rules_config'][$this->object->name] = $properties;
    return $strings;
}