private function upgrade(ContainerInterface $container)
    {
        $data = array_replace(self::DEFAULT_DATA, $container->getData());

        if (isset($data['media_id'])) {
            $data['image']['media'] = $data['media_id'];
            unset($data['media_id']);
        }
        if (isset($data['video_id'])) {
            $data['video']['media'] = $data['video_id'];
            unset($data['video_id']);
        }

        unset($data['padding_top']);
        unset($data['padding_bottom']);

        $container->setData($data);
    }
private function upgrade(ContainerInterface $container)
    {
        $data = array_replace(self::DEFAULT_DATA, $container->getData());

        if (isset($data['media_id'])) {
            $data['image']['media'] = $data['media_id'];
            unset($data['media_id']);
        }
        if (isset($data['video_id'])) {
            $data['video']['media'] = $data['video_id'];
            unset($data['video_id']);
        }

        unset($data['padding_top']);
        unset($data['padding_bottom']);

        $container->setData($data);
    }
private function upgrade ( ContainerInterface $ container ) { $ data = array_replace ( self :: DEFAULT_DATA , $ container -> getData ( ) ) ; if ( isset ( $ data [ 'media_id' ] ) ) { $ data [ 'image' ] [ 'media' ] = $ data [ 'media_id' ] ; unset ( $ data [ 'media_id' ] ) ; } if ( isset ( $ data [ 'video_id' ] ) ) { $ data [ 'video' ] [ 'media' ] = $ data [ 'video_id' ] ; unset ( $ data [ 'video_id' ] ) ; } unset ( $ data [ 'padding_top' ] ) ; unset ( $ data [ 'padding_bottom' ] ) ; $ container -> setData ( $ data ) ; }
Changes the container data to follow the 2019-03-11 changes.

@param ContainerInterface $container
Changes the container data to follow the 2019 - 03 - 11 changes .