예제 #1
0
파일: Edit.php 프로젝트: kronius/lti-base
 /**
  * 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);
     }
 }
예제 #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());
 }
예제 #3
0
 /**
  * doDefault
  */
 public function doDefault()
 {
     if (!$this->form->isSubmitted()) {
         $this->form->setFieldValue('coa-course-enable', explode(',', $this->form->getFieldValue('coa-course-enable')));
     }
 }
예제 #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')));
     }
 }