コード例 #1
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'generic');
     $this->setClass('btn-info');
     $this->setIcon('fa-file-excel-o');
     $this->setLabel('action.generic.excel');
 }
コード例 #2
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'generic');
     $this->setClass('btn-primary');
     $this->setIcon('fa-print');
     $this->setLabel('action.generic.excel');
 }
コード例 #3
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'object');
     $this->setIcon('fa-edit');
     $this->setLabel('action.object.edit.label');
     $this->setRoute($builder->getBaseActionsRoute() . '_edit');
     $this->setParams(array('pk' => '{{ ' . $builder->getModelClass() . '.' . $builder->getModelPrimaryKeyName() . ' }}'));
 }
コード例 #4
0
 protected function findBatchActions()
 {
     $batchActions = $this->getVariable('batch_actions', array());
     foreach ($batchActions as $actionName => $actionParams) {
         $action = $this->findBatchAction($actionName);
         if (!$action) {
             $action = new Action($actionName);
         }
         if ($globalCredentials = $this->getGenerator()->getFromYaml('params.credentials')) {
             // If generator is globally protected by credentials
             // batch actions are also protected
             $action->setCredentials($globalCredentials);
         }
         $this->setUserBatchActionConfiguration($action);
         $this->addBatchAction($action);
     }
 }
コード例 #5
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'generic');
     $this->setSubmit(true);
     $this->setClass('btn-success');
     $this->setIcon('fa-check');
     $this->setLabel('action.generic.save');
 }
コード例 #6
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'batch');
     $this->setIcon('fa-times');
     $this->setLabel('action.batch.delete.label');
     $this->setConfirm('action.batch.delete.confirm');
     $this->setCsrfProtected(true);
     $this->setOptions(array('success' => 'action.batch.delete.success', 'error' => 'action.batch.delete.success', 'i18n' => 'Admingenerator'));
 }
コード例 #7
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'object');
     $this->setIcon('fa-times');
     $this->setLabel('action.object.delete.label');
     $this->setConfirm('action.object.delete.confirm');
     $this->setCsrfProtected(true);
     $this->setRoute($builder->getObjectActionsRoute());
     $this->setParams(array('pk' => '{{ ' . $builder->getModelClass() . '.' . $builder->getModelPrimaryKeyName() . ' }}', 'action' => 'delete'));
     $this->setOptions(array('title' => 'action.object.delete.confirm', 'success' => 'action.object.delete.success', 'error' => 'action.object.delete.error', 'i18n' => 'Admingenerator'));
 }
コード例 #8
0
 protected function addAction(Action $action)
 {
     $this->actions[$action->getName()] = $action;
 }
コード例 #9
0
 protected function addObjectAction(Action $action)
 {
     $this->object_actions[$action->getName()] = $action;
 }
コード例 #10
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name);
     $this->setConfirm('{% trans from "Admingenerator" %}form.delete.confirm{% endtrans %}');
     $this->setParams(array('pk' => '{{ ' . $builder->getModelClass() . '.' . $builder->getModelPrimaryKeyName() . ' }}'));
 }
コード例 #11
0
 protected function addBatchAction(Action $action)
 {
     $this->batch_actions[$action->getName()] = $action;
 }
コード例 #12
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name);
     $this->setConfirm('batch.delete.confirm|tran({}, "Admingenerator")');
 }
コード例 #13
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name, 'generic');
     $this->setIcon('fa-list-alt');
     $this->setLabel('action.generic.list');
 }
コード例 #14
0
 public function __construct($name, BaseBuilder $builder)
 {
     parent::__construct($name);
     $this->setConfirm('{% trans from "Admingenerator" %}batch.delete.confirm{% endtrans %}');
 }