custom
3 days ago
index.html
3 days ago
item.php
3 days ago
separator.php
3 days ago
shape.php
3 days ago
item.php
45 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | VAPLoader::import('libraries.menu.item'); |
| 15 | |
| 16 | /** |
| 17 | * Extends the MenuItemShape class to handle a menu item. |
| 18 | * |
| 19 | * @since 1.5 |
| 20 | * @since 1.6.3 Renamed from LeftBoardMenuItem to LeftboardMenuItemShape. |
| 21 | */ |
| 22 | class LeftboardMenuItemShape extends MenuItemShape |
| 23 | { |
| 24 | /** |
| 25 | * @override |
| 26 | * Builds and returns the html structure of the menu item. |
| 27 | * This method must be implemented to define a specific graphic of the menu item. |
| 28 | * |
| 29 | * @return string The html of the menu item. |
| 30 | */ |
| 31 | public function buildHtml() |
| 32 | { |
| 33 | $data = array( |
| 34 | 'selected' => $this->isSelected(), |
| 35 | 'href' => $this->getHref(), |
| 36 | 'icon' => $this->getCustom(), |
| 37 | 'title' => $this->getTitle(), |
| 38 | ); |
| 39 | |
| 40 | $layout = new JLayoutFile('menu.leftboard.item'); |
| 41 | |
| 42 | return $layout->render($data); |
| 43 | } |
| 44 | } |
| 45 |