DeleteCookie.php 613 Bytes
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\TestModule1\Controller\CookieTester;

use \Magento\Framework\App\RequestInterface;

/**
 * Controller to test deletion of a cookie
 */
class DeleteCookie extends \Magento\TestModule1\Controller\CookieTester
{
    /**
     *
     * @return \Magento\Framework\App\ResponseInterface
     */
    public function execute()
    {
        $cookieName = $this->request->getParam('cookie_name');
        $this->getCookieManager()->deleteCookie($cookieName);
        return $this->_response;
    }
}