Kod
card_show2:
url: /card/show/*
class: sfDoctrineRoute
param: { module: card, action: show }
requirements: { sf_method: [get], sec_id: \w+ }
options: { model: VotingCard, type: object }
url: /card/show/*
class: sfDoctrineRoute
param: { module: card, action: show }
requirements: { sf_method: [get], sec_id: \w+ }
options: { model: VotingCard, type: object }
, i jeżeli dam taki url:
Cytat
localhost/card/show?sec_id=g6bwquvbl7g8
To wcale nie znajduje rekordu w bazie. W bazie istnieje pole sec_id dla tablicy tabeli voting card.
Czy Symfony w ogóle nie obsługuje standardowych url w odniesieniu do obiektów?
public function executeShow(sfWebRequest $request) { $this->card = $this->getRoute()->getObject(); }
Muszę użyć takiego zapisu bo to jest get z forma, a chyba nie da się zrobić tak, żeby form robił urle w stylu /cards/:sec_id/show