Exemplo n.º 1
0
 public function indexAction()
 {
     return new ViewModel(array('albums' => AlbumQuery::create()->find()));
 }
Exemplo n.º 2
0
 /**
  * Get the associated Album object
  *
  * @param PropelPDO $con Optional Connection object.
  * @param $doQuery Executes a query to get the object if required
  * @return Album The associated Album object.
  * @throws PropelException
  */
 public function getAlbum(PropelPDO $con = null, $doQuery = true)
 {
     if ($this->aAlbum === null && $this->album_id !== null && $doQuery) {
         $this->aAlbum = AlbumQuery::create()->findPk($this->album_id, $con);
         /* 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->aAlbum->addSongss($this);
            */
     }
     return $this->aAlbum;
 }