public function setModel(Core_Model_Adapter_Object $model, $useModel = true) { $this->model = $model; if ($useModel) { $modelCollection = new Core_Model_Adapter_ModelCollection(); $modelCollection->getModelCollection($model, false); if (sizeof($modelCollection->getData()) > 0) { $this->setTableData($modelCollection->toArray()); } $this->modelCollection = $modelCollection; } }