public function loadByFullActionNameAndStore(Aoe_TemplateImport_Model_Origin $object, $fullActionName, $storeId) { $read = $this->_getReadAdapter(); $select = $read->select()->from($this->getMainTable())->where('status = 1')->where('store_id = ?', $storeId)->where('? like full_action_name', $fullActionName)->order('priority asc')->limit(1); $data = $read->fetchRow($select); if (!$data) { return false; } $object->setData($data); $this->_afterLoad($object); return true; }
/** * Create clone * * @return Aoe_TemplateImport_Model_Origin */ public function createClone() { $data = $this->getData(); unset($data['entity_id']); unset($data['updated_at']); unset($data['source']); $data['full_action_name'] = 'CLONE: ' . $data['full_action_name']; $data['status'] = 0; $copy = new Aoe_TemplateImport_Model_Origin(); $copy->setData($data); return $copy; }