public function parseInsertTag(ReplaceInsertTagsEvent $event)
    {
        if ($event->getTag() != 'grid') {
            return;
        }

        if (TL_MODE !== 'FE') {
            $event->setHtml(sprintf('[[%s]]', $event->getRaw()));
            return;
        }

        $walker = $this->getWalker($event);

        if (!$walker) {
            return;
        }

        if ($event->getParam(3) === 'infinite' && !in_array($event->getParam(1), array('begin', 'end'))) {
            $event->setHtml($walker->column());
        } elseif (in_array($event->getParam(1), array('begin', 'walk', 'end'))) {
            $method = $event->getParam(1);
            $event->setHtml($walker->$method());
        } else {
            $event->setHtml($walker->column());
        }
    }