public function initialize() { $app = $this->app; if (empty($this->options)) { $this->options = array(); } Jobs::init($this->options); // do something here }
public function delete($id) { $this->data['entry'] = Jobs::findOne($id); if ($this->request->isPost() || $this->request->isDelete()) { try { Jobs::remove($id); h('notification.info', 'Job deleted.'); } catch (\Exception $e) { h('notification.error', $e); } } }