CTConfiguration::postProcess PHP Метод

postProcess() защищенный Метод

Processes submitted configuration variables
protected postProcess ( )
    protected function postProcess()
    {
        // @TODO Nicer solution ?
        $castFunctions = array('boolval', 'doubleval', 'floatval', 'intval', 'strval');
        $langIds = Language::getIDs(false);
        $values = array();
        foreach ($this->getOptionFields() as $key => $field) {
            $htmlAllowed = isset($field['html']) && $field['html'];
            if ($field['type'] == 'textareaLang' || $field['type'] == 'textLang') {
                $values[$key] = array();
                foreach ($langIds as $id_lang) {
                    $value = Tools::getValue($key . '_' . $id_lang);
                    if ($field['cast'] && in_array($field['cast'], $castFunctions)) {
                        $value = call_user_func($field['cast'], $value);
                    }
                    $values[$key][$id_lang] = $value;
                }
            } else {
                $value = Tools::getValue($key);
                if ($field['cast'] && in_array($field['cast'], $castFunctions)) {
                    $value = call_user_func($field['cast'], $value);
                }
                $values[$key] = $value;
            }
            Configuration::updateValue($key, $values[$key], $htmlAllowed);
        }
        if ($values['CT_CFG_BLOCKCATEGORIES_FOOTER']) {
            $this->hookModule('blockcategories', 'footer');
        } else {
            $this->unhookModule('blockcategories', 'footer');
        }
    }