Listing 13.24. Plik actions.class.php z modułu producent projektu 13.2
class Actions extends ActionsBase
{
    public function execute_list()
    {
        $q = Doctrine_Query::create()->from('Producent')->orderBy('nazwa');
        $producenci = $q->fetchArray();
        $this->set('producenci', $producenci);
    }
    public function execute_show()
    {
        if (
            isset($_GET['slug']) &&
            str_ivslug($_GET['slug']) &&
            ($producent = Doctrine::getTable('Producent')->findOneBySlug($_GET['slug']))
        ) {
            $this->set('producent', $producent);
        } else {
            $this->execute_404();
        }
    }
}
