Ejemplo n.º 1
0
 /**
  * execute
  */
 public function doDefault()
 {
     if (!$this->form->isSubmitted()) {
         // Load consumer values
         $this->form->setFieldValue('name', $this->consumer->name);
         $this->form->setFieldValue('key', $this->consumer->getKey());
         $this->form->setFieldValue('secret', $this->consumer->secret);
         $this->form->setFieldValue('css_path', $this->consumer->css_path);
         $this->form->setFieldValue('enabled', $this->consumer->enabled);
         //$this->form->setFieldValue('protected', $this->consumer->protected);
     }
 }
Ejemplo n.º 2
0
 public function testSubmitSimpleForm()
 {
     $form = new Form('product');
     $form->submit(['foo' => 'bar'], ['tmp' => '/foo.png']);
     $this->assertSame('product', $form->getName());
     $this->assertNull($form->getParent());
     $this->assertSame(['foo' => 'bar'], $form->getData());
     $this->assertSame(['tmp' => '/foo.png'], $form->getFiles());
     $this->assertTrue($form->isRoot());
     $this->assertTrue($form->isSubmitted());
 }
Ejemplo n.º 3
0
 /**
  * doDefault
  */
 public function doDefault()
 {
     if (!$this->form->isSubmitted()) {
         $this->form->setFieldValue('coa-course-enable', explode(',', $this->form->getFieldValue('coa-course-enable')));
     }
 }
Ejemplo n.º 4
0
 /**
  * doDefault
  */
 public function doDefault()
 {
     if (!$this->form->isSubmitted()) {
         $this->form->setFieldValue('system-maintenance-access-permission', explode(',', $this->getConfig()->get('system.maintenance.access.permission')));
     }
 }