public static function buildOptions($data, $options_map, $orderby, $options) {
		$data = \Object\Data\Common::options($data, $options_map, $options);
		// sorting
		if (!empty($options['i18n'])) {
			if ($options['i18n'] !== 'skip_sorting') {
				array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
			}
		} else if (empty($orderby)) {
			array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
		}
		return $data;
	}
public static function buildOptions($data, $options_map, $orderby, $options) {
		$data = \Object\Data\Common::options($data, $options_map, $options);
		// sorting
		if (!empty($options['i18n'])) {
			if ($options['i18n'] !== 'skip_sorting') {
				array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
			}
		} else if (empty($orderby)) {
			array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
		}
		return $data;
	}
public static function buildOptions ( $ data , $ options_map , $ orderby , $ options ) { $ data = \ Object \ Data \ Common :: options ( $ data , $ options_map , $ options ) ; // sorting if ( ! empty ( $ options [ 'i18n' ] ) ) { if ( $ options [ 'i18n' ] !== 'skip_sorting' ) { array_key_sort ( $ data , [ 'name' => SORT_ASC ] , [ 'name' => SORT_NATURAL ] ) ; } } else if ( empty ( $ orderby ) ) { array_key_sort ( $ data , [ 'name' => SORT_ASC ] , [ 'name' => SORT_NATURAL ] ) ; } return $ data ; }
Build options based on parameters, this must be used to have
consistencies in selects

@param array $data
@param array $options_map
@param array $orderby
@param array $options
@return array
Build options based on parameters this must be used to have consistencies in selects