Beispiel #1
0
 function handle($args)
 {
     parent::handle($args);
     // XXX: Ajax!
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $this->deleteNotice();
     } else {
         if ($_SERVER['REQUEST_METHOD'] == 'GET') {
             $this->showForm();
         }
     }
 }
Beispiel #2
0
 /**
  * init
  */
 public function init()
 {
     $this->tool = $this->getConfig()->getLtiToolProvider();
     // Create Table structure
     $ff = \Form\Factory::getInstance();
     $tf = \Table\Factory::getInstance();
     $this->table = $tf->createTable('Manager');
     $this->table->addCell(Checkbox::create());
     $this->table->addCell(NameCell::create('name'))->setKey()->setUrl(\Tk\Url::createHomeUrl('/consumer/edit.html'));
     $this->table->addCell(KeyCell::create('key'));
     $this->table->addCell($tf->createCellString('secret'));
     //$this->table->addCell($tf->createCellString('consumer_version'))->setLabel('Version');
     $this->table->addCell($tf->createCellBoolean('enabled'));
     $this->table->addCell($tf->createCellBoolean('protected'));
     $this->table->addCell(DateCell::create('updated'));
     $this->table->addCell(DateCell::create('created'));
     $this->table->addAction(DeleteAction::create());
     $this->addChild($tf->createTableRenderer($this->table), 'Manager');
 }
Beispiel #3
0
 /**
  * @return array
  */
 public function actions()
 {
     return ['index' => ['class' => IndexAction::className(), 'modelClass' => $this->modelClass], 'view' => ['class' => ViewAction::className(), 'modelClass' => $this->modelClass], 'create' => ['class' => CreateAction::className(), 'modelClass' => $this->modelClass], 'update' => ['class' => UpdateAction::className(), 'modelClass' => $this->modelClass], 'delete' => ['class' => DeleteAction::className(), 'modelClass' => $this->modelClass], 'search' => ['class' => SearchAction::className(), 'modelClass' => $this->modelClass]];
 }