public function addAction() { $form = new Form_Cadmin_AssetSubTypeAdd(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $asset_type = new CcmAssetTypes(); $asset_type->setAssetTypeName($form->asset_sub_type->getValue()); $asset_type->setStatus('1'); $parent_id = $this->_em->getRepository('CcmAssetTypes')->find($form->asset_type->getValue()); $asset_type->setParent($parent_id); $created_by = $this->_em->find('Users', $this->_userid); $asset_type->setCreatedBy($created_by); $asset_type->setCreatedDate(App_Tools_Time::now()); $asset_type->setModifiedBy($created_by); $asset_type->setModifiedDate(App_Tools_Time::now()); $this->_em->persist($asset_type); $this->_em->flush(); } } $this->_redirect("/cadmin/manage-asset-sub-types"); }
public function getModifiedBy() { $this->__load(); return parent::getModifiedBy(); }
public function getCreatedBy() { $this->__load(); return parent::getCreatedBy(); }