public function getRule(): ?Rule
    {
        $layoutView = $this->getLayoutView();
        if (!$layoutView instanceof LayoutViewInterface) {
            return null;
        }

        return $layoutView->getParameter('rule');
    }