/** * * @param $quickTaskId * @return Gpf_Db_QuickTask * @throws Gpf_DbEngine_NoRowException */ private function getQuickTask($quickTaskId) { $quickTask = new Gpf_Db_QuickTask(); $quickTask->setId($quickTaskId); $quickTask->load(); return $quickTask; }
/** * @param $request * @param $groupId * @param $validTo * @return string */ public function __construct(Gpf_Rpc_Request $request, Gpf_DateTime $validTo = null) { parent::__construct(); $json = new Gpf_Rpc_Json(); if ($validTo === null) { $validTo = new Gpf_DateTime(); $validTo->addDay(30); } $this->setAccountId(Gpf_Session::getInstance()->getAuthUser()->getAccountId()); $this->setGroupId(''); $this->setRequest($json->encode($request->toObject())); $this->setValidTo($validTo->toDateTime()); $this->insert(); return $this; }