Ejemplo n.º 1
0
 /**
  * Get the associated Element object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Element The associated Element object.
  * @throws     PropelException
  */
 public function getElement(PropelPDO $con = null)
 {
     if ($this->aElement === null && $this->element_id !== null) {
         $this->aElement = ElementPeer::retrieveByPk($this->element_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->aElement->addElementFiles($this);
         		 */
     }
     return $this->aElement;
 }
Ejemplo n.º 2
0
 public function executeView(sfWebRequest $request)
 {
     $element = ElementPeer::retrieveByPk($request->getParameter('element_id'));
     $this->forward404Unless($element);
     $this->element = $element;
 }