let createConfig = (obj1, obj2) => {
  obj1 = obj1 || {
    state: {}
  };
  return Object.assign(obj1, obj2);
};
export let config = createConfig(null, window.video_player_config);
export const setConfig = (newConfig) =>  {
  config = createConfig(null, newConfig);
};import { config, setConfig } from './config';      var a1,a2: array [1..10] of integer;
var b1,b2: array of integer;
a1 := a2; // копируется содержимое
b1 := b2; // копируется указательpublic function getOrdersAggregation()
    {
        return $this->getOrders()
            ->select(['status', 'count' => 'count(*)'])
            ->groupBy('status')
            ->asArray(true);
    }
    public function getOrdersStatusCount(int $status) : int
    {
        if( empty($this->ordersAggregation) ) {
            return 0;
        }
        $result = ArrayHelper::map($this->ordersAggregation, 'status', 'count');
        if( ! array_key_exists($status, $result) ) {
            return 0;
        }
        return $result[ $status ];
    }