public static function getParent(BlockView $view, $type)
    {
        $parent = null;

        if (null !== $view->parent) {
            if (static::isType($view->parent, $type)) {
                $parent = $view->parent;
            } else {
                $parent = static::getParent($view->parent, $type);
            }
        }

        return $parent;
    }