Exemple #1
0
 /**
  * Handle a bulk event
  *
  * @return \Cake\Network\Response
  * @throws \Crud\Error\Exception\ActionNotConfiguredException
  */
 protected function _handle()
 {
     $field = $this->config('field');
     if (empty($field)) {
         throw new ActionNotConfiguredException('No field value specified');
     }
     return parent::_handle();
 }
Exemple #2
0
 /**
  * Constructor
  *
  * @param \Cake\Controller\Controller $Controller Controller instance
  * @param array $config Default settings
  * @return void
  */
 public function __construct(Controller $Controller, $config = [])
 {
     $this->_defaultConfig['messages'] = ['success' => ['text' => 'Delete completed successfully'], 'error' => ['text' => 'Could not complete deletion']];
     return parent::__construct($Controller, $config);
 }