[TYPO3-ect] smartyView with div/lib

Steffen Kamper steffen at dislabs.de
Sat Jan 13 21:38:02 CET 2007


"Steffen Kamper" <steffen at dislabs.de> schrieb im Newsbeitrag 
news:mailman.1.1168712753.32323.typo3-team-extension-coordination at lists.netfielders.de...
> Hi Elmar,
>
> now i have the base class for the smartyView, and I'm not sure where to 
> store the values.
>
> as being independent i have a function for assigning values:
> function assignValue(&$masterArray,$varName,$varValue,$type='') {
>        switch($type) {
>            case 'date':
>                $masterArray[$varName]=$this->dateFormat($varValue);
>                break;
>            default:
>                $masterArray[$varName]=$varValue;
>        }
>    }
>
> but i see, that tx_lib_data has an array to store data. I don't know how 
> to use it right, i saw
>
> $this->set(name,value);
> $this->get(name);
>
> but how can walk through this array like foreach($array as $var=>$val) ?
>
> vg  Steffen
>
> btw p.knoerr doesn't responded, i found another mailaddie and tried this 
> now.
>

some additional notes. I looked to your efaq to understand the usage.

So something seems for me logic:

- the model should have base-modules like
1) base_controller
2) base_model
3) base_view
this modules have the main functions. any other modules should extend the 
base_module
It makes it more easy to extend the bases cause the structure is transparent 
and needed things are in base.

- views shouldn't extend the data-class, this should be an independent 
object, also to have more then one data-object.

- You make a lot of var logic in the template. This is ok for a phpView, but 
for other views the logic should be in the view. Ok, other views has to have 
own functions for filling template.

What do you think about ?

vg  Steffen





More information about the TYPO3-team-extension-coordination mailing list