1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Form
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Wrapper class for JFormHelper
14 *
15 * @package Joomla.Platform
16 * @subpackage Form
17 * @since 3.4
18 */
19 class JFormWrapperHelper
20 {
21 /**
22 * Helper wrapper method for loadFieldType
23 *
24 * @param string $type The field type.
25 * @param boolean $new Flag to toggle whether we should get a new instance of the object.
26 *
27 * @return mixed JFormField object on success, false otherwise.
28 *
29 * @see JFormHelper::loadFieldType()
30 * @since 3.4
31 */
32 public function loadFieldType($type, $new = true)
33 {
34 return JFormHelper::loadFieldType($type, $new);
35 }
36
37 /**
38 * Helper wrapper method for loadRuleType
39 *
40 * @param string $type The field type.
41 * @param boolean $new Flag to toggle whether we should get a new instance of the object.
42 *
43 * @return mixed JFormField object on success, false otherwise.
44 *
45 * @see JFormHelper::loadRuleType()
46 * @since 3.4
47 */
48 public function loadRuleType($type, $new = true)
49 {
50 return JFormHelper::loadRuleType($type, $new);
51 }
52
53 /**
54 * Helper wrapper method for loadFieldClass
55 *
56 * @param string $type Type of a field whose class should be loaded.
57 *
58 * @return mixed Class name on success or false otherwise.
59 *
60 * @see JFormHelper::loadFieldClass()
61 * @since 3.4
62 */
63 public function loadFieldClass($type)
64 {
65 return JFormHelper::loadFieldClass($type);
66 }
67
68 /**
69 * Helper wrapper method for loadRuleClass
70 *
71 * @param string $type Type of a rule whose class should be loaded.
72 *
73 * @return mixed Class name on success or false otherwise.
74 *
75 * @see JFormHelper::loadRuleClass()
76 * @since 3.4
77 */
78 public function loadRuleClass($type)
79 {
80 return JFormHelper::loadRuleClass($type);
81 }
82
83 /**
84 * Helper wrapper method for addFieldPath
85 *
86 * @param mixed $new A path or array of paths to add.
87 *
88 * @return array The list of paths that have been added.
89 *
90 * @see JFormHelper::addFieldPath()
91 * @since 3.4
92 */
93 public function addFieldPath($new = null)
94 {
95 return JFormHelper::addFieldPath($new);
96 }
97
98 /**
99 * Helper wrapper method for addFormPath
100 *
101 * @param mixed $new A path or array of paths to add.
102 *
103 * @return array The list of paths that have been added.
104 *
105 * @see JFormHelper::addFormPath()
106 * @since 3.4
107 */
108 public function addFormPath($new = null)
109 {
110 return JFormHelper::addFormPath($new);
111 }
112
113 /**
114 * Helper wrapper method for addRulePath
115 *
116 * @param mixed $new A path or array of paths to add.
117 *
118 * @return array The list of paths that have been added.
119 *
120 * @see JFormHelper::addRulePath()
121 * @since 3.4
122 */
123 public function addRulePath($new = null)
124 {
125 return JFormHelper::addRulePath($new);
126 }
127 }
128