예제 #1
0
 public function testNa()
 {
     $result = \Distilleries\Expendable\Helpers\StaticLabel::yesNo(-1);
     $this->assertTrue(is_string($result));
     $this->assertEquals($this->app['translator']->trans('expendable::label.na'), $result);
 }
예제 #2
0
 public function buildForm()
 {
     $this->add('id', 'hidden')->add('libelle', 'text', ['validation' => 'required', 'label' => trans('expendable::form.libelle')])->add('initials', 'text', ['validation' => 'required', 'label' => trans('expendable::form.initials')])->add('overide_permission', 'choice', ['choices' => StaticLabel::yesNo(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.allow_automatically_all_permission')]);
     $this->addDefaultActions();
 }
예제 #3
0
 public function buildForm()
 {
     $this->add('id', 'hidden')->add('libelle', 'text')->add('iso', 'text')->add('not_visible', 'choice', ['choices' => StaticLabel::yesNo(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.is_visible_for_customer')])->add('is_default', 'choice', ['choices' => StaticLabel::yesNo(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.default_language')])->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.status')]);
     $this->addDefaultActions();
 }