コード例 #1
0
ファイル: langue.php プロジェクト: Ashaan/sygil-framework
<?php

$core = Core::getInstance();
$core->loadModule('org.sygil.menu.vertical');
$menu = new MenuVertical(Session::DATA('target'), Session::DATA('parent'));
$menu->position->setTop('20px');
$menu->position->setRight('150px');
$menu->position->setWidth('150px');
$menu->position->setZ('151');
$langs = $core->getLangList();
foreach ($langs as $lang => $desc) {
    $menu->addOption($desc, 'switchLang(\'' . $lang . '\');');
}
$core->setContent($menu);
コード例 #2
0
ファイル: theme.php プロジェクト: Ashaan/sygil-framework
<?php

$core = Core::getInstance();
$core->loadModule('org.sygil.menu.vertical');
$menu = new MenuVertical(Session::DATA('target'), Session::DATA('parent'));
$menu->position->setTop('45px');
$menu->position->setRight('150px');
$menu->position->setWidth('150px');
$menu->position->setZ('151');
$themes = $core->getThemeList();
foreach ($themes as $theme => $desc) {
    $menu->addOption($desc, 'org.sygil.utilities.switchStyle(\'' . $theme . '\');');
}
$core->setData('__CONTENT__', $menu->generate());
コード例 #3
0
ファイル: account.php プロジェクト: Ashaan/sygil-framework
<?php

$core = Core::getInstance();
$core->loadModule('org.sygil.menu.vertical');
$menu = new MenuVertical(Session::DATA('target'));
$menu->position->setTop('19px');
$menu->position->setRight('0px');
$menu->position->setWidth('150px');
$menu->position->setZ('150');
$menu->addSubMenu('Langue', 'vmenu_langue', 'org.sygil.ajax.load(\'top/langue\',\'vmenu_langue\',\'replace\',[[\'parent\',\'' . Session::DATA('target') . '\']])');
$menu->addSubMenu('Theme', 'vmenu_theme', 'org.sygil.ajax.load(\'top/theme\',\'vmenu_theme\',\'replace\',[[\'parent\',\'' . Session::DATA('target') . '\']])');
$menu->addSeparator();
$session = Session::getInstance();
if (!$session->isLogged()) {
    $menu->addOption('Connection', 'org.sygil.ajax.load(\'top/log\',\'window_connect\',\'replace\',[])');
    $menu->addOption('Inscription', 'org.sygil.ajax.load(\'top/register\',\'window_register\',\'replace\',[])');
} else {
    $menu->addOption('Déconnection', 'org.sygil.ajax.load(\'top/logout\',\'window_disconnect\',\'replace\',[[\'disconnect\',1]])');
}
$menu->addSeparator();
$menu->addOption('A propos..', 'org.sygil.ajax.load(\'top/about\',\'window_about\',\'replace\',[])');
//echo $menu->generate();
$core->setContent($menu);