Contao\CoreBundle\EventListener\ToggleViewListener::getCookie PHP Method

getCookie() private method

Generates the TL_VIEW cookie based on the toggle_view value.
private getCookie ( string $value, string $basePath ) : Cookie
$value string
$basePath string
return Symfony\Component\HttpFoundation\Cookie The cookie object
    private function getCookie($value, $basePath)
    {
        if ('mobile' !== $value) {
            $value = 'desktop';
        }
        return new Cookie('TL_VIEW', $value, 0, $basePath);
    }