public function err($msg) { if (!empty($this->controller->Flash)) { $this->controller->Flash->error($msg); } else { $this->Shell->err($msg); } }