public static function getInstance($path, $params) { $page = parent::getInstance($path, $params); $page->userId = $params['user']; $page->deleteMode = isset($params['delete']) && $params['delete']; return $page; }
public static function getInstance($path, $params) { $page = parent::getInstance($path, $params); $page->groupId = $params['group']; $page->editMode = isset($params['edit']) && $params['edit']; return $page; }
public function init($params) { Page::requireNonce(); Authorization::logout(); self::redirectTo('login'); exit; }
public static function getInstance($path, $params) { $page = parent::getInstance($path, $params); $page->uid = isset($params['user']) ? $params['user'] : false; $page->confirmed = isset($params['confirmed']); $page->revert = isset($params['revert']); return $page; }
public static function getInstance($path, $params) { $page = parent::getInstance($path, $params); $page->page = isset($params['offset']) ? intval($params['offset']) : 1; if ($page->page <= 0) { $page->page = 1; } return $page; }
public function init($params) { Page::requireNonce(); Page::requirePermission('group.add_groups'); $dbc = Application::dbConnection(); $group_id = $dbc->groups()->addGroup('New Group'); self::redirectTo('groups/details', array('group' => $group_id, 'edit' => 1)); exit; }
private static function initWebRenderer($options) { $renderer = new WebRenderer($options); $renderer->provide('pageURL', function ($path, $params = array()) { return Page::getURL($path, $params)->build(); }); $renderer->provide('theUser', Authorization::user()); $renderer->provide('theNonce', Authorization::getNonce()); return $renderer; }
public static function getInstance($path, $params) { Page::requirePermission('settings.change_site_settings'); if (!count($path)) { self::redirectTo('settings/site/general'); exit; } $sname = $path[0]; $path = self::nextPath($path); switch ($sname) { case 'general': $page = Site\GeneralSettingsPage::getInstance($path, $params); break; case 'links': $page = Site\LinksSettingsPage::getInstance($path, $params); break; case 'users': $page = Site\UsersSettingsPage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }
public static function getInstance($path, $params) { $page = parent::getInstance($path, $params); $page->linkId = $params['link']; $page->editMode = isset($params['edit']) && $params['edit']; $page->deleteMode = isset($params['delete']) && $params['delete']; return $page; }