Exemplo n.º 1
0
 protected function process()
 {
     global $core;
     $rc = parent::process();
     unset($core->vars['cached_sites']);
     return $rc;
 }
Exemplo n.º 2
0
 protected function validate(\ICanBoogie\Errors $errors)
 {
     if ($this->key == 1) {
         $errors['uid'] = new FormattedString("Daddy cannot be deleted.");
     }
     return parent::validate($errors);
 }
Exemplo n.º 3
0
 protected function process()
 {
     $rc = parent::process();
     $this->response->message = $this->format("%name was deleted.", ['name' => $this->record->name]);
     if (!$this->response->location) {
         $this->response->location = $this->app->routes['admin:posts:index'];
     }
     return $rc;
 }
Exemplo n.º 4
0
 /**
  * Overrides the method to create a nicer log entry.
  */
 protected function process()
 {
     $title = $this->record->title;
     $rc = parent::process();
     if ($rc) {
         $this->response->message = new FormattedString('%title has been deleted from %module.', ['title' => \ICanBoogie\shorten($title), 'module' => $this->module->title]);
     }
     return $rc;
 }