%PDF- %PDF-
| Direktori : /usr/share/l.v.e-manager/interworx/lvemanager/Plugin/ |
| Current File : //usr/share/l.v.e-manager/interworx/lvemanager/Plugin/Lvemanager.php |
<?php
/**
* Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
*
* Licensed under CLOUD LINUX LICENSE AGREEMENT
* http://cloudlinux.com/docs/LICENSE.TXT
*/
class Plugin_Lvemanager extends Plugin {
protected $_sw_menu_icon_small = '/plugins/images/lvemanager/lvemanager16.gif';
protected $_sw_menu_icon_large = '/plugins/images/lvemanager/lvemanager16.gif';
protected function _init() {
}
public function updateSiteworxMenu( IWorxMenuManager $MenuMan ) {
try {
if( IW::NW()->getWorkingUser()->getMenuStyle() === User::MENU_BIG ) {
$icon = $this->_sw_menu_icon_large;
} else {
$icon = $this->_sw_menu_icon_small;
}
} catch( IWorx_Exception_NotLoggedIn $e ) {
$icon = $this->_sw_menu_icon_small;
}
$new_data = array( 'text' => 'Resource usage',
'url' => '/siteworx/resource/usage',
'class' => 'iw-i-star' );
$MenuMan->addMenuItemAfter( 'iw-menu-home', 'hello', $new_data );
}
public function updateNodeworxMenu( IWorxMenuManager $MenuMan ) {
try {
if( IW::NW()->getWorkingUser()->getMenuStyle() === User::MENU_BIG ) {
$icon = $this->_sw_menu_icon_large;
} else {
$icon = $this->_sw_menu_icon_small;
}
} catch( IWorx_Exception_NotLoggedIn $e ) {
$icon = $this->_sw_menu_icon_small;
}
$new_data = array( 'text' => 'CloudLinux Manager',
'url' => '/nodeworx/lve/manager',
'class' => 'iw-i-star',
'disabled_for_reseller' => '1' );
$MenuMan->addMenuItemAfter( 'iw-menu-home', 'lvemanager', $new_data );
}
}
?>