public function __construct(array $params = null) { global $CFG; $params_array = array(); // Grab the main link parameter // the url portion for the link $link_url = !empty($params['linkurl']) ? $params['linkurl'] : ''; // the comma separated list of parameters we will look for $link_params = !empty($params['linkparams']) ? $params['linkparams'] : ''; // Check to see if URI needs to be prepended if (substr($link_url, 0, 7) != 'http://' && substr($link_url, 0, 8) != 'https://') { $link_url = $CFG->wwwroot . '/' . $link_url; } $link_params_array = strlen($link_params) > 0 ? explode(',', $link_params) : array(); // Append specified params to the link URL if (!empty($link_params_array)) { foreach ($link_params_array as $link_param) { $param_value = $params[$link_param]; if (substr($param_value, 0, 1) == '=') { list($junk, $rep_var) = explode('=', $param_value); $param_value = isset($params[$rep_var]) ? $params[$rep_var] : $param_value; } $params_array[$link_param] = urlencode($param_value); } } parent::__construct($params_array); //set up the url and parameters on the current page object $this->set_url($link_url, $params_array); }
function build_navbar_default($who = null) { global $CFG; parent::build_navbar_default($who); $page = $this->get_new_page(array('action' => 'default'), true); //$this->navbar->add(get_string('learningplan', 'local_elisprogram'), "{$CFG->wwwroot}/local/elisprogram/"); $this->navbar->add(get_string('results_engine_defaults_config', 'local_elisprogram'), $page->url); }
function build_navbar_default($who = null) { // was build_navigation_default global $CFG; parent::build_navbar_default($who); $page = $this->get_new_page(array('action' => 'default'), true); //$this->navbar->add(get_string('learningplan', 'local_elisprogram'), "{$CFG->wwwroot}/local/elisprogram/"); $this->navbar->add(get_string('notifications', 'local_elisprogram'), $page->url); }
function print_header($_) { $id = $this->required_param('id', PARAM_INT); $default_tab = !empty($this->default_tab) ? $this->default_tab : get_class($this); $action = $this->optional_param('action', $default_tab, PARAM_CLEAN); if ($action == 'default') { $action = $default_tab; } $association_id = $this->optional_param('association_id', 0, PARAM_INT); parent::print_header($_); $params = array('id' => $id); if (!empty($association_id)) { $params['association_id'] = $association_id; } if ($parentid = $this->optional_param('parent', 0, PARAM_INT)) { $params['parent'] = $parentid; } $this->get_tab_page()->print_tabs($action, $params); }
function build_navbar_default($who = null) { parent::build_navbar_default($who); $this->navbar->add(get_string('defaultcls', 'local_elisprogram'), $this->url); }
function print_header($_) { $id = required_param('id', PARAM_INT); parent::print_header($_); $this->get_tab_page()->print_tabs(get_class($this), array('id' => $id)); }
public function build_navbar_default($who = null, $addparent = true, $params = array()) { if (!$who) { $who = $this; } if ($addparent) { parent::build_navbar_default($who, $addparent = true, $params = array()); } $url = $this->get_new_page($params, true)->url; // TBD: who-> $who->navbar->add(get_string("manage_{$this->data_class}", 'local_elisprogram'), $url); }
/** * Return the page parameters for the page. Used by the constructor for * calling $this->set_url(). * * @return array */ protected function _get_page_params() { $params = parent::_get_page_params(); $id = $this->required_param('id', PARAM_INT); $params['id'] = $id; return $params; }
function print_footer() { if (!$this->is_bare()) { return parent::print_footer(); } }
public function build_navbar_default($who = null) { parent::build_navbar_default($who); $url = $this->get_new_page(array('level' => 'user'), true)->url; $this->navbar->add(get_string("manage_custom_fields", 'local_elisprogram'), $url); }
public function print_header($_) { if (!$this->is_bare()) { parent::print_header($_); $this->print_tabs(); } }
function __construct(array $params = null) { parent::__construct($params); }
function __construct(array $params = null) { $this->tabs = array(array('tab_id' => 'default', 'page' => get_class($this), 'params' => array('action' => 'default'), 'name' => get_string('current', 'block_courserequest')), array('tab_id' => 'requests', 'page' => get_class($this), 'params' => array('action' => 'requests'), 'name' => get_string('requests', 'block_courserequest'))); parent::__construct($params); }