private function addData(\Faderim\Framework\Model\BaseModel $oData) { $aDataAtual = array(); $oStore = $this->View->getStore(); foreach ($oStore->getFields() as $oField) { $sProp = $oField->getName(); $aDataAtual[$sProp] = $oData->beanGetProperty($sProp); } $this->data[] = $aDataAtual; }
public function filterByRel($sNameRel, \Faderim\Framework\Model\BaseModel $oModel) { $ModelInfo = $oModel->getModelInfo()->getDataId(); foreach ($ModelInfo as $oData) { $sModelName = $oData->getModelName(); $xVal = $oModel->beanGetProperty($sModelName); if (empty($xVal)) { throw new \Exception('Invalid value for col ' . $sModelName); } $this->filter($sNameRel . '.' . $sModelName, '=', $xVal); } return $this; }