Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (32 sloc) 771 Bytes
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\web\twig\nodes;
use Craft;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Class RequireLoginNode
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 3.0
*/
class RequireLoginNode extends Node
{
// Public Methods
// =========================================================================
/**
* Compiles a RequireLoginNode into PHP.
*
* @param Compiler $compiler
*/
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(Craft::class . "::\$app->controller->requireLogin();\n");
}
}
You can’t perform that action at this time.