Skip to content

Instantly share code, notes, and snippets.

@davidino
Created June 1, 2011 15:20
Show Gist options
  • Select an option

  • Save davidino/1002521 to your computer and use it in GitHub Desktop.

Select an option

Save davidino/1002521 to your computer and use it in GitHub Desktop.
documentation congow
<?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();
}
dsl_car:
class: sfDoctrineRouteCollection
options:
model: DslCar
module: car
prefix_path: /car
column: id
with_wildcard_routes: true
<?php
$this->dispatcher->notify(new sfEvent($this, 'congow.findModelRoutes', array(
'items' => array(
array(
'model' => 'DslCarRegistry',
'route' => 'car',
),
array(
'model' => 'DslPippo',
'route' => 'pippo',
)
),
)));
<?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