/** * 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; }
public function executeView(sfWebRequest $request) { $element = ElementPeer::retrieveByPk($request->getParameter('element_id')); $this->forward404Unless($element); $this->element = $element; }