2016-06-05 04:26:50 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class CustomAdminSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|
|
|
{
|
2021-02-10 16:50:20 +08:00
|
|
|
const
|
|
|
|
NAME = '',
|
|
|
|
CATEGORY = 'General',
|
|
|
|
DESCRIPTION = '';
|
|
|
|
|
2016-06-05 04:26:50 +08:00
|
|
|
/**
|
|
|
|
* @return void
|
|
|
|
*/
|
2020-08-31 00:04:54 +08:00
|
|
|
public function Init() : void
|
2016-06-05 04:26:50 +08:00
|
|
|
{
|
|
|
|
$this->UseLangs(true); // start use langs folder
|
|
|
|
|
|
|
|
$this->addJs('js/CustomAdminSettings.js', true); // add js file
|
|
|
|
|
2020-12-30 22:50:47 +08:00
|
|
|
$this->addJsonHook('JsonAdminGetData', 'JsonAdminGetData');
|
2016-06-05 04:26:50 +08:00
|
|
|
|
2020-11-25 21:39:46 +08:00
|
|
|
$this->addTemplate('templates/PluginCustomAdminSettingsTab.html', true);
|
2016-06-05 04:26:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
2020-12-30 22:50:47 +08:00
|
|
|
public function JsonAdminGetData()
|
2016-06-05 04:26:50 +08:00
|
|
|
{
|
2020-12-30 22:50:47 +08:00
|
|
|
return $this->jsonResponse(__FUNCTION__, array(
|
2016-06-05 04:26:50 +08:00
|
|
|
'PHP' => phpversion()
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|