load->model('event_city_location_model'); // load event type model $CI->load->model('event_type_model'); //Populate result switch ($settingsType) { case 'city': return $CI->event_city_location_model->list_city(); break; case 'eventTypes': return $CI->event_type_model->list_event_types(); break; } } /** * Set check for event types and locations * * @param integer $match = element value * @param integer $ids = list of selected ids in table * @return void * access public function */ function checkOrUncheck(int $match, $listIds) { if(notSet($listIds)){ return ''; } //return checked attribute if (in_array($match, $listIds)) { return 'checked=checked'; } } function convertNumericToBoolean($numericValue): string { if ($numericValue > 0) { return 'true'; } return 'false'; }