/** * _get_states * * @access public * @param array $countries * @param bool $flush_cache * @return array */ public function get_all_active_states($countries = array(), $flush_cache = FALSE) { if (!self::$_active_states || $flush_cache) { $countries = is_array($countries) && !empty($countries) ? $countries : EEM_Country::instance()->get_all_active_countries(); self::$_active_states = $this->get_all(array(array('STA_active' => TRUE, 'CNT_ISO' => array('IN', array_keys($countries))), 'order_by' => array('STA_name' => 'ASC'), 'limit' => array(0, 99999), 'force_join' => array('Country'))); } return self::$_active_states; }
/** * _get_states * * @access private * @return void */ public function get_all_active_states() { if (!self::$_active_states) { self::$_active_states = $this->get_all(array(array('STA_active' => TRUE), 'order_by' => array('STA_name' => 'ASC'), 'limit' => array(0, 99999))); } return self::$_active_states; }