function rewind() { $ns = $this->number_source->current(); $Number = WactTemplate::getValue($ns, 'BaseNumber'); if (!empty($Number)) { $this->iterator = new WactArrayIterator(array(array('Num' => $Number), array('Num' => $Number * $Number), array('Num' => $Number * $Number * $Number))); } else { $this->iterator = new WactArrayIterator(array()); } $this->iterator->rewind(); }
protected function _renderOptGroups($groups, $level) { foreach ($groups as $group) { if (!($options = WactTemplate::getValue($group, 'options'))) { continue; } echo '<optgroup '; $this->_renderOptGroupTagAttributes($group, $level); echo '>'; $this->_renderOptions($options, $level + 1); echo '</optgroup>'; } }
/** * Get the named property from the form DataSource * @param string variable name * @return mixed value or void if not found * @access public * @deprecated will probablybe removed in a future reorganization of * how form elements become associated with their values */ function getValue($name) { return WactTemplate::getValue($this->datasource, $name); }
function get($field) { return WactTemplate::getValue($this->datasource, $field); }