protected function renderEntityWidget($entities, array $options = [])
    {
        if (!array_key_exists('field', $options)) {
            // throw new \InvalidArgumentException('Missing "field" option for entity widget.');
            $options['field'] = null;
        }
        if (!array_key_exists('route', $options)) {
            $options['route'] = null;
        }
        if (!array_key_exists('route_params', $options)) {
            $options['route_params'] = [];
        }
        if (!array_key_exists('route_params_map', $options)) {
            $options['route_params_map'] = ['id' => 'id'];
        }

        if (null !== $entities && !($entities instanceof Collection)) {
            $entities = new ArrayCollection([$entities]);
        }

        $vars = [
            'route' => $options['route'],
            'field' => $options['field'],
            'route_params'     => $options['route_params'],
            'route_params_map' => $options['route_params_map'],
            'entities' => $entities
        ];

        return $this->renderBlock('show_widget_entity', $vars);
    }