postWidgetText/src/Frontend.php

35 lines
688 B
PHP

<?php
declare(strict_types=1);
namespace Dotclear\Plugin\postWidgetText;
use Dotclear\App;
use Dotclear\Core\Process;
/**
* @brief postWidgetText frontend class.
* @ingroup postWidgetText
*
* @author Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
class Frontend extends Process
{
public static function init(): bool
{
return self::status(My::checkContext(My::FRONTEND));
}
public static function process(): bool
{
if (!self::status()) {
return false;
}
App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...));
return true;
}
}