public static function convert2list($input, $key = 'id', $value = 'name', $orderby = '', $dir = 'a') { ci()->load->helper('array'); return array2list($input, $key, $value, $orderby, $dir); }
public function editAction($id = null) { $this->input->is_valid('is_a_primary', $id); $this->load->helper('array'); $this->page->data(['controller_action' => 'edit', 'record' => $this->o_role_model->get($id), 'access' => array2list((array) $this->o_role_access_model->get_many_by_role_id($id), 'id', 'name'), 'all_access' => $this->o_access_model->catalog(), 'access_tabs' => array_unique($this->o_access_model->catalog('id', 'group'))])->build($this->controller_path . '/form'); }