function wtk_id_classes($id, $classes, $type = null, $tooltip = null) { wtk_id($id); wtk_classes($classes); wtk_djt($type); wtk_attr('title', $tooltip); }
<div<?php wtk_id_classes($id, $flags, $dojoType); ?> > <?php if (isset($this->title)) { $level = $level > 0 ? min($level, 6) : 6; echo "<h" . $level . " "; $flags[1] = "h"; wtk_classes($flags); echo ">"; $this->title->output(); echo "</h" . $level . ">"; ?> <?php } $this->outputChildren(); ?> </div>
><?php echo $caption; ?> </option> <?php } ?> </select> <?php } else { foreach ($items as $value => $caption) { $for = wtk_strtoid($name . $value); ?> <label<?php wtk_attr('for', $for); wtk_classes(wtk_strtoid($value)); ?> ><input<?php wtk_attr('id', $for); wtk_attr('name', $name . ($multiple ? '[]' : '')); wtk_attr('value', $value); wtk_attr('type', $multiple ? 'checkbox' : 'radio'); wtk_attr('checked', is_array($selected) ? in_array($value, $selected) : $value == $selected ? 'checked' : NULL); ?> /> <?php echo $caption; ?> </label> <?php }
foreach ($items as $item) { if ($item) { switch ($item) { case 'year': echo "<input size=\"5\" maxlength=\"4\""; wtk_classes($flags, $item); wtk_attr('name', $name . '[year]'); wtk_attr('value', $year); wtk_attr('type', 'number'); echo " />"; break; case 'month': case 'day': case 'hour': case 'min': case 'sec': echo "<input size=\"2\" maxlength=\"2\""; wtk_classes($flags, $item); wtk_attr('name', $name . '[' . $item . ']'); wtk_attr('value', ${$item}); wtk_attr('type', 'number'); wtk_attr('min', $minvalues[$item]); wtk_attr('max', $maxvalues[$item]); echo " />"; break; default: echo "<span>" . $item . "</span>\n"; break; } } }
<?php } ?> <tr<?php wtk_classes(array(($i + 1) % 2 ? 'odd' : 'even', $rclasses[$i])); wtk_djt($rowDojoType); ?> > <?php for ($j = 0; $j < $cols; $j++) { ?> <?php $id = 'cell-' . $i . '-' . $j; ?> <td<?php wtk_classes($cclasses[$j]); ?> ><?php $this->{$id}->output(); ?> </td> <?php } ?> </tr> <?php } ?> <?php if ($cat_opened) { ?>
<div<?php wtk_id_classes($id, $flags); ?> > <?php if ($title) { ?> <h6<?php wtk_classes($flags, 'h'); ?> ><?php echo $title; ?> </h6> <?php } $this->content->output(); ?> </div>
} } ?> > <?php if (isset($this->errors)) { $this->errors->output(); } if (isset($this->caption)) { ?> <label<?php wtk_attr('for', $id); ?> ><?php $this->caption->output(); ?> </label> <?php } $iflags = array_merge($flags, array('input')); ?> <span<?php wtk_classes($iflags); ?> > <?php $this->control->output(); ?> </span> </div>