Beispiel #1
0
 public function fields()
 {
     $this->object_id = PrimaryField::create()->setLabel('@string/object_id');
     $this->object_name = TextField::create(32)->setLabel('@string/object_name')->setRequired(TRUE);
     $this->user_id = Many2OneField::create('User')->setLabel('@string/user_id');
     $this->date = DateField::create();
     $this->time = TimeField::create();
     $this->value = DoubleField::create()->setDefaultValue(5.0)->setRequired(TRUE);
     $this->enumerate = EnumField::create(array('first' => 'First', 'second' => 'Second'))->setDefaultValue('first');
 }
Beispiel #2
0
 public function fields()
 {
     $this->role_id = Many2OneField::create('Role')->setLabel('@string/role')->setRequired(TRUE);
     $this->user_id = Many2OneField::create('User')->setLabel('@string/user')->setRequired(TRUE);
 }