/** * @param Aoe_ExtendedFilter_Model_Interface $filter * @param array $params * * @return mixed */ public function process(Aoe_ExtendedFilter_Model_Interface $filter, array $params) { // Re-parse the third parameter with the parameter tokenizer and discard original parameters $params = $filter->getIncludeParameters($params[2]); // Grab the store $storeId = $filter->getStoreId(); // Pull out expected parameters $path = isset($params['path']) ? $params['path'] : ''; $modifiers = isset($params['modifiers']) ? $params['modifiers'] : ''; // Lookup config $value = ''; if (!empty($path)) { $value = Mage::getStoreConfig($path, $storeId); } // If we have modifiers, process now if (!empty($modifiers)) { $value = $filter->amplifyModifiers($value, $modifiers); } return $value; }
/** * @param Aoe_ExtendedFilter_Model_Interface $filter * @param array $params * * @return mixed */ public function process(Aoe_ExtendedFilter_Model_Interface $filter, array $params) { // Re-parse the third parameter with the tokenizer and discard original parameters $params = $filter->getIncludeParameters($params[2]); // Pull out expected parameters $text = isset($params['text']) ? $params['text'] : ''; $modifiers = isset($params['modifiers']) ? $params['modifiers'] : ''; $module = isset($params['module']) ? $params['module'] : 'core'; // Create helper here as a fail-fast $helper = Mage::helper($module); // Prep parameters for translation call unset($params['text']); unset($params['modifiers']); unset($params['module']); array_unshift($params, $text); // Translate the text $text = call_user_func_array([$helper, '__'], $params); // If we have modifiers, process now if (!empty($modifiers)) { $text = $filter->amplifyModifiers($text, $modifiers); } return $text; }
/** * @param Aoe_ExtendedFilter_Model_Interface $filter * @param array $params * * @return mixed */ public function process(Aoe_ExtendedFilter_Model_Interface $filter, array $params) { // Re-parse the third parameter with the tokenizer and discard original parameters $params = $filter->getIncludeParameters($params[2]); return isset($params['code']) ? Mage::helper('aoe_sessionvars')->getSessionVar($params['code']) : ''; }