1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: namespace Xoops\Form;
13:
14: /**
15: * ContainerInterface - Form container
16: *
17: * @category Xoops\Form\ContainerInterface
18: * @package Xoops\Form
19: * @author trabis <lusopoemas@gmail.com>
20: * @copyright 2012-2015 XOOPS Project (http://xoops.org)
21: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
22: * @link http://xoops.org
23: */
24: interface ContainerInterface
25: {
26: /**
27: * Add an element to the group
28: *
29: * @param Element $formElement Element to add
30: * @param boolean $required true = entry required
31: *
32: * @return void
33: */
34: public function addElement(Element $formElement, $required = false);
35:
36: /**
37: * getRequired - get an array of required form elements
38: *
39: * @return array array of Xoops\Form\Element
40: */
41: public function getRequired();
42:
43: /**
44: * getElements - get an array of forms elements
45: *
46: * @param boolean $recurse true to get elements recursively
47: *
48: * @return array of Xoops\Form\Element
49: */
50: public function getElements($recurse = false);
51: }
52: