PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / site / helpers / libraries / menu / horizontal / shape.php
vikappointments / site / helpers / libraries / menu / horizontal Last commit date
custom 3 days ago index.html 3 days ago item.php 3 days ago separator.php 3 days ago shape.php 3 days ago
shape.php
71 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.shape');
15
16 /**
17 * Extends the MenuShape class to handle an horizontal menu.
18 *
19 * @since 1.6.3
20 */
21 class HorizontalMenuShape extends MenuShape
22 {
23 /**
24 * @overrides
25 * Builds and returns the html structure of the menu that wraps the children.
26 * This method must be implemented to define a specific graphic of the menu.
27 *
28 * @param string $html The full structure of the children of the menu.
29 *
30 * @return string The html of the menu.
31 */
32 protected function buildHtml($html)
33 {
34 $layout = new JLayoutFile('menu.horizontal.menu');
35
36 return $layout->render(array('html' => $html));
37 }
38
39 /**
40 * @override
41 * Builds and returns the html opening that will wrap the body contents.
42 * This html will be displayed after the menu.
43 *
44 * @return string The body opening html.
45 *
46 * @since 1.6.3
47 */
48 public function openBody()
49 {
50 $layout = new JLayoutFile('menu.horizontal.body.open');
51
52 return $layout->render();
53 }
54
55 /**
56 * @override
57 * Builds and returns the html closing that will wrap the body contents.
58 * This html will be displayed after the menu and the body opening.
59 *
60 * @return string The body closing html.
61 *
62 * @since 1.6.3
63 */
64 public function closeBody()
65 {
66 $layout = new JLayoutFile('menu.horizontal.body.close');
67
68 return $layout->render();
69 }
70 }
71