libreschool-startpage/root/usr/share/nethesis/NethServer/Module/Startpage/General.php

31 lines
809 B
PHP

<?php
namespace NethServer\Module\Startpage;
use Nethgui\System\PlatformInterface as Validate;
class General extends \Nethgui\Controller\AbstractController
{
public function initialize()
{
parent::initialize();
$this->declareParameter('status', Validate::SERVICESTATUS, array('startpage', 'configuration', 'status'));
}
public function prepareView(\Nethgui\View\ViewInterface $view)
{
parent::prepareView($view);
$view['statusDatasource'] = array_map(function($fmt) use ($view) {
return array($fmt, $view->translate($fmt . '_label'));
}, array('enabled','disabled'));
}
protected function onParametersSaved($changes)
{
$this->getPlatform()->signalEvent('startpage-refresh &');
}
}