]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/helper/class_BaseHelper.php
Following things are changed: (in order of class names)
[shipsimu.git] / inc / classes / main / helper / class_BaseHelper.php
index bd27e03df04ed591089896ac4e9908d5a4505aa4..dab6791f0e8830a4bdd4b2abce2fff30d4b3f4b7 100644 (file)
@@ -81,11 +81,8 @@ class BaseHelper extends BaseFrameworkSystem {
                // Get the value from value instance
                $fieldValue = $this->getField($fieldName);
 
-               // Add a group
-               $this->getTemplateInstance()->setVariableGroup('values');
-
                // Assign it with a template variable
-               $this->getTemplateInstance()->addGroupVariable($fieldName, $fieldValue);
+               $this->getTemplateInstance()->assignVariable("block_" . $fieldName, $fieldValue);
        }
 
        /**
@@ -95,19 +92,17 @@ class BaseHelper extends BaseFrameworkSystem {
         * @param       $fieldName              Name of the field to assign
         * @param       $filterMethod   Method name to call of the value instance
         * @return      void
+        * @todo        Rewrite this method using a helper class for filtering data
         */
        public function assignFieldWithFilter ($fieldName, $filterMethod) {
                // Get the value
                $fieldValue = $this->getField($fieldName);
 
                // Now filter it through the value through the filter method
-               $filteredValue = call_user_func_array(array($this->valueInstance, "doFilter" . ucfirst($filterMethod)), array($fieldValue));
-
-               // Add a group
-               $this->getTemplateInstance()->setVariableGroup('values');
+               $filteredValue = call_user_func_array(array($this, "doFilter" . ucfirst($filterMethod)), array($fieldValue));
 
                // Assign it with a template variable
-               $this->getTemplateInstance()->addGroupVariable($fieldName, $fieldValue);
+               $this->getTemplateInstance()->assignVariable("block_" . $fieldName, $filteredValue);
        }
 
        /**