18 $this->_equalWidth=$equalWidth;
22 public function addFields($fields=NULL, $label=NULL) {
24 if (!\is_array($fields)) {
25 $fields=\func_get_args();
27 if (\is_string($end)) {
36 foreach ( $fields as $field ) {
49 if (\is_string($label)) {
57 $item=parent::addItem($item);
59 $item->setContainer($this);
67 return parent::getItem($index);
71 if ($this->_equalWidth) {
72 $count=$this->
count();
73 $this->
addToProperty(
"class", Wide::getConstants()[
"W".$count].
" fields");
76 return parent::compile($js, $view);
80 $this->_equalWidth=
false;
81 return $this->
getItem($index)->setWidth($width);
85 $this->_equalWidth=
false;
91 $this->_equalWidth=
false;
105 public static function radios(
$identifier,$name, $items=array(), $label=NULL, $value=
null, $type=NULL) {
108 foreach ( $items as $val => $caption ) {
109 $itemO=
new HtmlFormRadio($name.
"-".$i++, $name, $caption, $val, $type);
111 $itemO->getDataField()->setProperty(
"checked",
"");
117 $lbl=$radios->setLabel($label);
119 $lbl->setProperty(
"for", $name);
125 public static function checkeds(
$identifier,$name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
128 foreach ( $items as $val => $caption ) {
130 $itemO->setName($name);
131 if (\array_search($val, $values)!==
false) {
132 $itemO->getDataField()->setProperty(
"checked",
"");
138 $radios->setLabel($label)->setProperty(
"for", $name);
148 return parent::run($js);
insertItem($item, $position=0)
Base class for Semantic Html collections.
Base class for Semantic double elements.
addToProperty($name, $value, $separator=" ")