PluginProbe
WP Ultimate Post Grid / 1.7.2
WP Ultimate Post Grid v1.7.2
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / vendor / vafpress / classes / option / control / group / menu.php

menu.php in WP Ultimate Post Grid 1.7.2, at vendor/vafpress/classes/option/control/group/menu.php

109 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class VP_Option_Control_Group_Menu extends VP_Option_Control_Group
4 {
5
6 /**
7 * Collection of $_menu
8 * @var VP_Option_Control_Group
9 */
10 private $_menus;
11
12 /**
13 * Collection of controls
14 * @var VP_Control_Field
15 */
16 private $_controls;
17
18 private $_icon;
19
20 public function __construct()
21 {
22 parent::__construct();
23 $this->_menus = array();
24 $this->_controls = array();
25 }
26
27 public function render($extra = array())
28 {
29 // Setup data
30 $this->_setup_data();
31 $this->add_data('menu', $this);
32 foreach ($extra as $key => $value)
33 {
34 $this->add_data($key, $value);
35 }
36 return VP_View::instance()->load('option/menu', $this->get_data());
37 }
38
39 public function add_menu($menu)
40 {
41 $this->_menus[] = $menu;
42 }
43
44 /**
45 * Getter of $_menus
46 *
47 * @return Array Collection of menus object
48 */
49 public function get_menus() {
50 return $this->_menus;
51 }
52
53 /**
54 * Setter of $_menus
55 *
56 * @param Array $_menus Collection of menus object
57 */
58 public function set_menus($_menus)
59 {
60 $this->_menus = $_menus;
61 return $this;
62 }
63
64 public function add_control($control)
65 {
66 $this->_controls[] = $control;
67 }
68
69 /**
70 * Getter of controls
71 *
72 * @return Array Collection of controls object
73 */
74 public function get_controls()
75 {
76 return $this->_controls;
77 }
78
79 /**
80 * Setter of controls
81 *
82 * @param Array $_controls Collection of controls object
83 */
84 public function set_controls($_controls)
85 {
86 $this->_controls = $_controls;
87 return $this;
88 }
89
90 /**
91 * Get menu icon
92 *
93 * @return String Icon URL
94 */
95 public function get_icon() {
96 return $this->_icon;
97 }
98
99 /**
100 * Set menu icon
101 *
102 * @param String $_icon Icon URL
103 */
104 public function set_icon($_icon) {
105 $this->_icon = $_icon;
106 return $this;
107 }
108
109 }