Server IP : 103.233.192.212 / Your IP : 3.142.171.199 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/public_html/backup/protected/extensions/bootstrap/widgets/ |
Upload File : |
<?php /** * TbDropdown class file. * @author Christoffer Niska <ChristofferNiska@gmail.com> * @copyright Copyright © Christoffer Niska 2012- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @package bootstrap.widgets */ Yii::import('bootstrap.widgets.TbBaseMenu'); /** * Bootstrap dropdown menu. * @see http://twitter.github.com/bootstrap/javascript.html#dropdowns */ class TbDropdown extends TbBaseMenu { /** * Initializes the widget. */ public function init() { parent::init(); if (isset($this->htmlOptions['class'])) $this->htmlOptions['class'] .= ' dropdown-menu'; else $this->htmlOptions['class'] = 'dropdown-menu'; } /** * Renders the content of a menu item. * Note that the container and the sub-menus are not rendered here. * @param array $item the menu item to be rendered. Please see {@link items} on what data might be in the item. * @return string the rendered item */ protected function renderMenuItem($item) { if (isset($item['icon'])) { if (strpos($item['icon'], 'icon') === false) { $pieces = explode(' ', $item['icon']); $item['icon'] = 'icon-'.implode(' icon-', $pieces); } $item['label'] = '<i class="'.$item['icon'].'"></i> '.$item['label']; } if (!isset($item['linkOptions'])) $item['linkOptions'] = array(); if (isset($item['items']) && !empty($item['items'])) $item['url'] = '#'; $item['linkOptions']['tabindex'] = -1; if (isset($item['url'])) return CHtml::link($item['label'], $item['url'], $item['linkOptions']); else return $item['label']; } /** * Returns the divider CSS class. * @return string the class name */ public function getDividerCssClass() { return 'divider'; } /** * Returns the dropdown css class. * @return string the class name */ public function getDropdownCssClass() { return 'dropdown-submenu'; } /** * Returns whether this is a vertical menu. * @return boolean the result */ public function isVertical() { return true; } }