modules/Settings/Users/views/SwitchUsers.php
<?php
/**
* Switch Users View Class.
*
* @package Settings.View
*
* @copyright YetiForce S.A.
* @license YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)
* @author Mariusz Krzaczkowski <m.krzaczkowski@yetiforce.com>
*/
class Settings_Users_SwitchUsers_View extends Settings_Vtiger_Index_View
{
/** {@inheritdoc} */
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$moduleModel = Settings_Users_Module_Model::getInstance();
$viewer = $this->getViewer($request);
$viewer->assign('SWITCH_USERS', $moduleModel->getSwitchUsers());
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('MODULE', $moduleName);
$viewer->view('SwitchUsers.tpl', $qualifiedModuleName);
}
/** {@inheritdoc} */
public function getFooterScripts(App\Request $request)
{
return array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts([
"modules.Settings.{$request->getModule()}.resources.SwitchUsers",
]));
}
}