/** * 2015-12-28 * @param string[] $filter [optional] * @param int|string|null|bool|StoreInterface $store [optional] * @return array(array(string => string)) */ function df_currencies_options(array $filter = [], $store = null) { return dfcf(function (array $filter = [], $store = null) { /** @var array(string => string) $all */ $all = df_currencies_ctn($store); return df_map_to_options(!$filter ? $all : dfa_select_ordered($all, $filter)); }, func_get_args()); }
/** * 2015-11-14 * @override * @see \Magento\Framework\Option\ArrayInterface::toOptionArray() * @return array(array(string => string)) */ public function toOptionArray() { return df_map_to_options($this->map()); }
/** * 2015-12-28 * Преобразует при необходимости простой одномерный массив в список опций. * @param string[] $values * @return array(array(string => string|int)) */ function df_a_to_options(array $values) { /** @var mixed $first */ $first = df_first($values); return is_null($first) || isset($first['value']) ? $values : df_map_to_options(dfa_combine_self($values)); }