src/Extensions/GridFieldBetterButtonsItemRequest.php
protected function getToplevelController()
    {
        $c = $this->owner->getController();
        while ($c && $c instanceof GridFieldDetailForm_ItemRequest) {
            $c = $c->getController();
        }
        return $c;
    }
protected function getToplevelController()
    {
        $c = $this->owner->getController();
        while ($c && $c instanceof GridFieldDetailForm_ItemRequest) {
            $c = $c->getController();
        }
        return $c;
    }
Gets the top level controller.

@return Controller
@todo  This had to be directly copied from {@link GridFieldDetailForm_ItemRequest}
because it is a protected method and not visible to a decorator!