src/DatagridFactory.php
public function createDatagrid($configurator, string $name = null, array $options = []): DatagridInterface
    {
        if (!$configurator instanceof DatagridConfiguratorInterface) {
            $configurator = $this->datagridRegistry->getConfigurator($configurator);
        }

        if (null === $name) {
            $name = StringUtil::fqcnToBlockPrefix(get_class($configurator));
        }

        $builder = $this->createDatagridBuilder();
        $configurator->buildDatagrid($builder, $options);

        return $builder->getDatagrid($name);
    }
public function createDatagrid($configurator, string $name = null, array $options = []): DatagridInterface
    {
        if (!$configurator instanceof DatagridConfiguratorInterface) {
            $configurator = $this->datagridRegistry->getConfigurator($configurator);
        }

        if (null === $name) {
            $name = StringUtil::fqcnToBlockPrefix(get_class($configurator));
        }

        $builder = $this->createDatagridBuilder();
        $configurator->buildDatagrid($builder, $options);

        return $builder->getDatagrid($name);
    }
{@inheritdoc}