public function testMailActionsArray() { $config = $this->app['config']->get('expendable.mail.actions'); $result = \Distilleries\Expendable\Helpers\StaticLabel::mailActions(); $this->assertTrue(is_array($result)); foreach ($config as $value) { $this->assertArrayHasKey($value, $result); } }
public function build() { $this->add('id'); $this->add('libelle', null, trans('expendable::datatable.subject')); $this->add('body_type', function ($model) { return StaticLabel::bodyType($model->body_type); }, trans('expendable::datatable.type')); $this->add('action', function ($model) { return StaticLabel::mailActions($model->action); }); $this->add('cc'); $this->add('bcc'); $this->addTranslationAction(); $this->addDefaultAction(); }
public function buildForm() { $this->add($this->model->getKeyName(), 'hidden')->add('libelle', 'text', ['validation' => 'required', 'label' => trans('expendable::form.subject')])->add('body_type', 'choice', ['choices' => StaticLabel::bodyType(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.body_type')])->add('action', 'choice', ['choices' => StaticLabel::mailActions(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.action')])->add('cc', 'tag', ['label' => trans('expendable::form.cc')])->add('bcc', 'tag', ['label' => trans('expendable::form.bcc')])->add('content', 'tinymce', ['validation' => 'required', 'label' => trans('expendable::form.content')])->add('status', 'choice', ['choices' => StaticLabel::status(), 'empty_value' => '-', 'validation' => 'required', 'label' => trans('expendable::form.status')])->addDefaultActions(); }