/** * Construct this page * @param array $args * @param array $request_remainder */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $this->id = 0; if ($this->request_exists("id")) { $this->id = $this->request("id"); } }
/** * Create a new instance of this page. * * This will call the parent constructor and then setup the base * template pages for the {@link I2CE_Template template}. It also sets up the values * for the member variables. * @param string $title The title for this page. * @param string $defaultHTMLFile The default HTML file for this page. * @param mixed $access The role required to access this page. * @param array $files The list of template files to load for this page. */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $this->id = false; if ($this->isPost()) { if ($this->post_exists('id')) { $this->id = $this->post('id'); } } else { if ($this->get_exists('id')) { $this->id = $this->get('id'); } } }
/** * Create a new instance of a page. * * The default constructor should be called by any pages extending this object. It creates the * {@link I2CE_Template} and {@link I2CE_User} objects and sets up the basic member variables. * @param array $args * @param array $request_remainder The remainder of the request path */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $this->id = 0; if ($this->isPost() && $this->post_exists('id')) { $this->id = $this->post('id'); } elseif ($this->get_exists('id')) { $this->id = $this->get('id'); } if ($this->id > 0 && array_key_exists('edit_access', $args) && is_array($args['edit_access'])) { $this->setAccess($args['edit_access']); } if ($this->get_exists('parent')) { $this->parent_id = $this->get('parent'); } }
/** * Create a new instance of this page. * * This will call the parent constructor and then setup the base * template pages for the {@link I2CE_Template template}. It also sets up the values * for the member variables. * @param string $title The title for this page. * @param string $defaultHTMLFile The default HTML file for this page. * @param mixed $access The role required to access this page. * @param array $files The list of template files to load for this page. */ public function __construct($args, $request_remainder, $get = null, $post = null) { parent::__construct($args, $request_remainder, $get, $post); $this->type = ""; $this->id = ''; $this->select_field = false; $this->select_field_value = ''; $arr = array('id' => &$this->id, 'type' => &$this->type, 'field' => &$this->select_field); foreach ($arr as $key => &$val) { if ($this->request_exists($key)) { $val = $this->request($key); } } if (strlen($this->id) > 0 && strpos($this->id, '|') === false) { I2CE::raiseError("Deprecated use of id: {$this->id}"); $this->id = $this->type . '|' . $this->id; } }
/** * Create a new instance of a page. * * The default constructor should be called by any pages extending this object. It creates the * {@link I2CE_Template} and {@link I2CE_User} objects and sets up the basic member variables. * @param array $args * @param array $request_remainder The remainder of the request path */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $form_name = $args['page_form']; if (empty($form_name)) { I2CE::raiseError("No form name specified", E_USER_ERROR); } $this->form_name = $form_name; $this->id = 0; if ($this->isPost() && $this->post_exists('id')) { $this->id = $this->post('id'); } elseif ($this->get_exists('id')) { $this->id = $this->get('id'); } if ($this->isPost() && $this->post_exists('parent')) { $this->parent_id = $this->post('parent'); } elseif ($this->get_exists('parent')) { $this->parent_id = $this->get('parent'); } }
/** * Create a new instance of this page. * * This will call the parent constructor and then setup the base * template pages for the {@link I2CE_Template template}. It also sets up the values * for the member variables. * @param string $title The title for this page. * @param string $defaultHTMLFile The default HTML file for this page. * @param mixed $access The role required to access this page. * @param array $files The list of template files to load for this page. */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $this->person_id = false; $this->id = "person_scheduled_training_course|0"; if ($this->isPost()) { if ($this->post_exists('parent')) { $this->person_id = $this->post('parent'); } if ($this->post_exists('id')) { $this->id = $this->post('id'); } } else { if ($this->get_exists('parent')) { $this->person_id = $this->get('parent'); } if ($this->get_exists('id')) { $this->id = $this->get('id'); } } }
/** * Create a new instance of this page. * * This will call the parent constructor and then setup the base * template pages for the {@link I2CE_Template template}. It also sets up the values * for the member variables. * @param string $title The title for this page. * @param string $form_name The form name of the form being edited. * @param mixed $access The role required to access this page. * @param array $files The list of template files to load for this page. */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $form_name = $args['page_form']; if (empty($form_name)) { I2CE::raiseError("No form name specified", E_USER_ERROR); } $this->form_name = $form_name; }
/** * Create a new instance of a page. * * The default constructor should be called by any pages extending this object. It creates the * {@link I2CE_Template} and {@link I2CE_User} objects and sets up the basic member variables. * @param array $args * @param array $request_remainder The remainder of the request path */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $form_name = $args['page_form']; if (empty($form_name)) { I2CE::raiseError("No form name specified", E_USER_ERROR); } $this->form_name = $form_name; $this->id = 0; if ($this->isPost() && $this->post_exists('id')) { $this->id = $this->post('id'); } elseif ($this->get_exists('id')) { $this->id = $this->get('id'); } if ($this->id > 0 && array_key_exists('edit_access', $args) && is_array($args['edit_access'])) { $this->setAccess($args['edit_access']); } if ($this->get_exists('parent')) { $this->parent_id = $this->get('parent'); } $this->edit_form = false; }
/** * Create a new instance of this page. * * This will call the parent constructor and then setup the base * template pages for the {@link Template template}. It also sets up the values * for the member variables. */ public function __construct($args, $request_remainder) { parent::__construct($args, $request_remainder); $this->id = 0; if ($this->isPost() && $this->post_exists('id')) { $this->id = $this->post('id'); } elseif ($this->get_exists('id')) { $this->id = $this->get('id'); } $this->position_id = ""; $this->last_id = ""; $this->person_id = ""; if ($this->isPost()) { $salary = $this->factory->createContainer($this->getForm()); if ($salary instanceof I2CE_Form) { $salary->load($this->post); $this->person_position = $this->factory->createContainer($salary->getParent()); $this->last_id = $salary->last; } } elseif ($this->get_exists('parent')) { $this->position_id = $this->get('parent'); if (strlen($this->position_id) > 0) { $this->person_position = $this->factory->createContainer($this->position_id); } if ($this->get_exists('last')) { $this->last_id = $this->get('last'); } } if (strlen($this->last_id) > 0) { $this->last = $this->factory->createContainer($this->last_id); $this->last->populate(); } if ($this->person_position instanceof iHRIS_PersonPosition) { $this->person_position->populate(); $this->person_id = $this->person_position->getParentID(); } }