Created
June 1, 2011 15:20
-
-
Save davidino/1002521 to your computer and use it in GitHub Desktop.
documentation congow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function executeShow(sfWebRequest $request) | |
| { | |
| $this->setSite($request); | |
| $this->root = $this->site->getRoot(); | |
| $this->page = $request->getParameter('page'); | |
| $this->car = $this->getRoute()->getObject(); | |
| $this->forward404Unless($this->car->isPublished(), sprintf('Release (%d) is not published', $this->car->getId() )); | |
| $this->carPage = Doctrine::getTable('CongowPage')->getIndexPage($this->site, 'DslCar'); | |
| if ($this->carPage) | |
| { | |
| $this->crumbs = $this->carPage->buildBreadcrumbs(); | |
| $this->crumbs[false] = $this->carPage->getTitle (); | |
| $this->assignBoxes($this->carPage); | |
| } | |
| $this->car = $this->car->getEntity(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dsl_car: | |
| class: sfDoctrineRouteCollection | |
| options: | |
| model: DslCar | |
| module: car | |
| prefix_path: /car | |
| column: id | |
| with_wildcard_routes: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $this->dispatcher->notify(new sfEvent($this, 'congow.findModelRoutes', array( | |
| 'items' => array( | |
| array( | |
| 'model' => 'DslCarRegistry', | |
| 'route' => 'car', | |
| ), | |
| array( | |
| 'model' => 'DslPippo', | |
| 'route' => 'pippo', | |
| ) | |
| ), | |
| ))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function configure() | |
| { | |
| parent::configure(); | |
| //visualizzare i campi internazionalizzati | |
| $this->i18nize(); | |
| //si occupa di integrare nel form la spunta di pubblicazione | |
| $this->embedRelation('registry'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment