protected function _init()
 {
     parent::_init();
     if (is_string($this->_sourceModel)) {
         $this->_sourceModel = Kwf_Model_Abstract::getInstance($this->_sourceModel);
     }
 }
Example #2
0
 protected function _init()
 {
     parent::_init();
     if (!$this->getProxyModel() instanceof Kwf_Model_RowsSubModel_Interface) {
         throw new Kwf_Exception("proxyModel doesn't implement Kwf_Model_RowsSubModel_Interface");
     }
     if ($this->_parentModel) {
         $this->getProxyModel()->setParentModel($this->_parentModel);
     }
 }
 protected function _init()
 {
     parent::_init();
     $this->_exprs['format'] = new Kwf_Model_Select_Expr_String('html');
 }
 protected function _init()
 {
     parent::_init();
     $this->_exprs['child_count'] = new Kwf_Model_Select_Expr_Child_Count('Child');
 }
 protected function _init()
 {
     $this->_proxyModel = new Kwf_Model_FnF(array('uniqueIdentifier' => 'unique', 'columns' => array('id', 'firstname', 'timefield'), 'uniqueColumns' => array('id'), 'data' => array(array('id' => 1, 'firstname' => 'mch', 'timefield' => '1234'))));
     parent::_init();
 }
 protected function _init()
 {
     parent::_init();
     $this->_exprs['sum_foo'] = new Kwf_Model_Select_Expr_Child('Relation', new Kwf_Model_Select_Expr_Sum('foo'));
     $this->_exprs['sum_fooplusone'] = new Kwf_Model_Select_Expr_Child('Relation', new Kwf_Model_Select_Expr_Sum(new Kwf_Model_Select_Expr_Sql('foo+1', array('foo'))));
 }
 protected function _init()
 {
     parent::_init();
     $this->_referenceMap = array('Parent' => 'parent_id->Kwf_Model_DbWithConnection_ParentExprFieldProxyReference_ParentModel');
     $this->_exprs['foo'] = new Kwf_Model_Select_Expr_Parent('Parent', 'foo');
 }
 protected function _init()
 {
     parent::_init();
     $this->_exprs['parent_name'] = new Kwf_Model_Select_Expr_Parent('Parent', 'name');
 }
 protected function _init()
 {
     $this->_proxyModel = new Kwf_Model_Mongo_TestModel();
     $this->_dependentModels['Foo'] = new Kwf_Model_Mongo_RowsSubModel(array('parentModel' => $this, 'fieldName' => 'foo', 'referenceMap' => array('Parent' => array('refModelClass' => 'Kwf_Model_Mongo_ChildRowsWithParentExpr_BothProxy_ParentModel', 'column' => 'parent_id'), 'Mongo' => Kwf_Model_RowsSubModel_Interface::SUBMODEL_PARENT), 'exprs' => array('parent_name' => new Kwf_Model_Select_Expr_Parent('Parent', 'name'), 'mongo_name' => new Kwf_Model_Select_Expr_Parent('Mongo', 'name'))));
     parent::_init();
 }