symfony: sfDoctrineRoute ek Parametre geçmek

0 Cevap php

Ben Symfony 1.4 kullanıyorum ve ben benim /-Route Rota şu var:

homepage:
  url:   /
  class:   sfDoctrineRoute
  options: { model: ContentPage, type: object}
  param: { module: page, action: show}

ve benim show-Eylem bu gibi görünüyor:

class pageActions extends sfActions
{
  public function executeShow(sfWebRequest $request)
  {
    $this->content_page = $this->getRoute()->getObject();
    $this->forward404Unless($this->content_page);
    $this->forward404Unless($this->content_page->getPublished());
  }
}

It works but it selects always the first entry of the ContentPage-Table. Is there a way to pass a "Doctrine-Select-Parameter" inside the routing.yml to use a specific id or so?

Regards, uhu.

0 Cevap