2020-09-28 07:16:43
Многие спрашивают: "легко ли расширять функционал доргена?"
Вот пример заготовки плагина под Thunder 3.
use League\Plates\Engine; use League\Plates\Extension\ExtensionInterface; class DemoPlugin implements ExtensionInterface { public function __construct ($container = null) { $this->container = $container; } public function register(Engine $engine) { $engine->registerFunction('helloWorld', [$this, 'helloWorld']); } public function helloWorld() { return 'Hello World'; } }
теперь в вашем шаблоне доступна новая функция:
helloWorld(); ?>
keyboard_arrow_leftkeyboard_arrow_leftkeyboard_arrow_left Трафик с дорвеев на Thunder 3 под Google Bert , очень 2020 года
Как работать с мультикеями в Thunder 3 keyboard_arrow_right keyboard_arrow_right keyboard_arrow_right