コード例 #1
0
 /**
  * Sends a request for the creation of the new area.
  * 
  * @param AreaRequest $request
  */
 public function insert(AreaRequest $request)
 {
     $request->setRequestor($this->tokenStorage->getToken()->getUser());
     $this->transaction->requestTransaction();
     try {
         $id = $request->insert($this->conn);
         $this->eventDispatcher->dispatch(CantigaEvents::AREA_REQUEST_CREATED, new AreaRequestEvent($request));
         return $id;
     } catch (Exception $ex) {
         $this->transaction->requestRollback();
         throw $ex;
     }
 }