Example #1
0
 public function executeBillingVoucher(sfWebRequest $request)
 {
     $client = ClientPeer::retrieveByPk($request->getParameter('id'));
     $this->forward404Unless($client);
     // create the document
     $doc = new sfTinyDoc();
     $doc->createFrom();
     $doc->loadXml('content.xml');
     $doc->mergeXmlField('client', $client);
     $doc->saveXml();
     $doc->close();
     // send and remove the document
     $doc->sendResponse();
     $doc->remove();
     throw new sfStopException();
 }
Example #2
0
 public function executeSidebarEdit(sfWebRequest $request)
 {
     $this->client = ClientPeer::retrieveByPk($request->getParameter('id'));
 }
Example #3
0
 /**
  * Get the associated Client object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Client The associated Client object.
  * @throws     PropelException
  */
 public function getClient(PropelPDO $con = null)
 {
     if ($this->aClient === null && $this->client_id !== null) {
         $this->aClient = ClientPeer::retrieveByPk($this->client_id);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aClient->addOrders($this);
         		 */
     }
     return $this->aClient;
 }