src/PHPDish/Bundle/AdminBundle/GridFactory/GridFactoryAggregate.php
public function get($sourceClass)
    {
        if (isset($this->factories[$sourceClass])) {
            $factory = $this->factory[$sourceClass];
            $grid = $factory->getGrid();
        } else {
            $reflection = new \ReflectionClass($sourceClass);
            if (!$reflection->isInstantiable()) {
                throw new \InvalidArgumentException(sprintf('The "%s" cannot be instantiated'));
            }
            $grid = $this->factory->createGrid($sourceClass);
        }
        //handle request
        $grid->handleRequest($this->requestStack->getCurrentRequest());
        return $grid;
    }
public function get($sourceClass)
    {
        if (isset($this->factories[$sourceClass])) {
            $factory = $this->factory[$sourceClass];
            $grid = $factory->getGrid();
        } else {
            $reflection = new \ReflectionClass($sourceClass);
            if (!$reflection->isInstantiable()) {
                throw new \InvalidArgumentException(sprintf('The "%s" cannot be instantiated'));
            }
            $grid = $this->factory->createGrid($sourceClass);
        }
        //handle request
        $grid->handleRequest($this->requestStack->getCurrentRequest());
        return $grid;
    }
获取grid source

@param string $sourceClass
@return GridInterface
@throws \ReflectionException