/** * Shows the webtemp image exports for all devices configured. * * @return The webtemp view */ public function webtempAction() { $this->view->setMainView('layouts/empty'); $this->view->device = Devices::findFirst(array('conditions' => 'id = ?1', 'order' => 'name', 'bind' => array(1 => intval($_GET['id'])))); }
/** * Deletes a device if $_GET['id'] is present. * Redirects back to index. */ public function devices_deleteAction() { if (isset($_GET['id'])) { Devices::findFirst(array('conditions' => 'id = ?1', 'bind' => array(1 => intval($_GET['id']))))->delete(); } return (new Response())->redirect('settings/index#devices'); }