A component to manage the formatting in the input / output data as a CActiveRecordBehavior. Opportunity makes the job of AutoTimeStamp.
protected/componentsSee the following code example:
public function behaviors() { return array( 'FormatBehaviorAutoTimeStamp' => array( 'class' => 'application.components.FormatBehavior', 'typeFormater' => 'dateTime', 'useTimeStamp'=>true, 'autoTimeStamp'=>true, ), 'FormatBehaviorMoney' => array( 'class' => 'application.components.FormatBehavior', 'typeFormater' => 'money', 'collumns'=>array('price', 'freight') ), 'FormatBehaviorData' => array( 'class' => 'application.components.FormatBehavior', 'typeFormater' => 'datetime', 'collumns'=>array('delivery') ), ); }
Total 1 comment
What about 'typeFormater' => 'datetime' and nationalization? Does it supports different date format rules in different languages or is coded to support English / American date formats only?
Leave a comment
Please login to leave your comment.