Example #1
0
 /**
  * @param \Grido\Components\Actions\Event $action
  * @return $this
  */
 public function connectActionAsDelete(Event $action)
 {
     $action->onClick[] = $this->tableDelete;
     $action->setConfirm(function ($entity) {
         if (method_exists($entity, '__toString')) {
             return array('Really delete \'%s\'?', (string) $entity);
         }
         return 'Really delete?';
     });
     $this->getTable()->setOperation(array('delete' => 'Delete'), $this->tableDelete);
     return $this;
 }