Agile Toolkit
4.2
Agile Toolkit is a powerful web development framework. Inspired by GUI Applications development
|
Public Member Functions | |
editable ($x=undefined) | |
calculated ($x=undefined) | |
set ($expr=null) | |
getExpr () | |
updateSelectQuery ($select) | |
updateInsertQuery ($insert) | |
updateModifyQuery ($insert) | |
Data Fields | |
$expr = null |
Implementation of a Expression fields in Model_Table Field_Expression implements ability to specify expressions inside your Model_Table and have them appear as a read-only fields. Use: $model->addExpression('age','year(now())-year(birthdate)'); // Below example achieves the same, but it prefixes age with proper table name $model->addExpression('age','year(now())-year('.$model->getElement('adatege')->getField().')'); $model->addExpression('row_counter',$this->api->db->dsql()->useExpr(' := +1'); $myctl=$this->add('Controller_MiscMySQL'); // using custom controller to format field $model->addExpression('date_formatted',array($myctl,'dateExpr1')); or $myctl=$this->add('Controller_MiscMySQL'); // or by using closure and extra argument $model->addExpression('date_formatted',function($model,$query) uses $myctl { return $myctl->dateExpr2($query,'date_raw'); }); NOTE: MiscMySQL is fictional controller. See http://agiletoolkit.org/about/license
calculated | ( | $ | x = undefined | ) |
Reimplemented from Field.
updateInsertQuery | ( | $ | insert | ) |
Modify insert query to set value of this field
Reimplemented from Field.
updateModifyQuery | ( | $ | modify | ) |
Modify insert query to set value of this field
Reimplemented from Field.
updateSelectQuery | ( | $ | select | ) |
Modifies specified query to include this particular field
Reimplemented from Field.
$expr = null |