Skip to content

Instantly share code, notes, and snippets.

<?php
class BaseForm extends sfFormSymfony
{
static protected $user = null;
static public function getUser()
{
return self::$user;
}
*/
class OrdinativiHealthStateForm extends BaseOrdinativiHealthStateForm
{
public function configure()
{
$this->useFields(array('name'));
$this->widgetSchema->setLabels(array(
'name' => 'Nome',
));
<?php
class BaseForm extends sfFormSymfony
{
static protected $user = null;
static public function getUser()
{
return self::$user;
}
<?php
class BaseForm extends sfFormSymfony
{
static protected $user = null;
static public function getUser()
{
return self::$user;
}
<?php
/**
* healthstate actions.
*
* @package ordinativi
* @subpackage healthstate
* @author KEY5
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
<?php
class OrdinativiMenuItemDayTable extends Doctrine_Table
{
public static function getInstance()
{
return Doctrine_Core::getTable('OrdinativiMenuItemDay');
}
<?php
/**
* BaseOrdinativiMenuItem
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $menu_id
* @property string $name
* @property string $type
OrdinativiMenuItem:
actAs: { Timestampable: ~ }
columns:
menu_id: { type: integer, notnull: true, default: 0 }
name: { type: string(255), notnull: true }
type: { type: string(3) }
state: { type: integer, notnull: true, default: 0 }
enabled: { type: boolean, notnull: true, default: 0 }
relations:
OrdinativiHealthState: { type: many, foreignType: one, class: OrdinativiHealthState, local: state, foreign: id, onDelete: CASCADE, foreignAlias: OrdinativiHealthStates }
<?php
class OrdinativiMenuItemDayTable extends Doctrine_Table
{
public static function getInstance()
{
return Doctrine_Core::getTable('OrdinativiMenuItemDay');
}
<?php
$foods = Doctrine_Query::create()
->from('OrdinativiMenuItemDay a')
->leftJoin('a.MenuItemDays m')
->where('a.menu_id = ? ', $menu_id );
var_dump($foods->fetchArray());