/** * 2016-01-11 * @param bool $withDefault [optional] * @param bool $codeKey [optional] * @return array|\Magento\Store\Api\Data\StoreInterface[] */ function df_stores($withDefault = false, $codeKey = false) { /** * 2016-01-29 * Добави @uses df_ksort(), потому что иначе порядок элементов различается * в зависимости от того, загружается ли страница из кэша или нет. * Для модуля Dfe\SalesSequence нам нужен фиксированный порядок. */ return df_ksort(df_store_m()->getStores($withDefault, $codeKey)); }
/** * 2016-07-10 * @see \Magento\Sales\Block\Adminhtml\Transactions\Detail\Grid::getTransactionAdditionalInfo() * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php#L112-L125 * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php#L112-L125 * @param II|OP|QP|null $payment * @param array(string => mixed) $values * @return void */ function dfp_set_transaction_info(II $payment, array $values) { $payment->setTransactionAdditionalInfo(T::RAW_DETAILS, df_ksort($values)); }