Nette\Forms\Controls\CsrfProtection::attached PHP Method

attached() protected method

protected attached ( $parent )
    protected function attached($parent)
    {
        parent::attached($parent);
        if (!$this->session && $parent instanceof Nette\Application\UI\Presenter) {
            $this->session = $parent->getSession();
        }
    }