function __construct($text, $value = '', $selected = false) { parent::__construct('option'); $this->_text = $this->add(new jqmText($text), true); $this->_value = $this->attribute('value', $value, true); $this->_selected = $this->attribute('selected', $selected ? 'selected' : '', true); }
/** * * @param string $href */ function __construct($href = '') { parent::__construct('link'); $this->attribute('type', 'text/css'); $this->attribute('rel', 'stylesheet'); $this->_href = $this->attribute('href', $href, true); }
/** * * @param string $doctype * @param string $xmlns * @param string $charset * @param string $title * @param string $css * @param string $jq * @param string $jqm */ function __construct($doctype = JQMPHP_DOCTYPE, $xmlns = JQMPHP_XMLNS, $charset = JQMPHP_CHARSET, $title = JQMPHP_TITLE, $css = JQMPHP_CSS, $jq = JQMPHP_JQ, $jqm = JQMPHP_JQM) { parent::__construct('html'); $this->_doctype = new jqmText($doctype); $this->_head = $this->add(new jqmHead($xmlns, $charset, $title, $css, $jq, $jqm), true); $this->_body = $this->add(new jqmBody(), true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param bool $fullscreen * @param bool $nobackbtn */ function __construct($id, $attributes = array(), $items = array(), $theme = '', $fullscreen = false, $nobackbtn = false) { parent::__construct('div', $id, $attributes, '', $theme); if (is_array($items)) { for ($i = 0; $i < count($items); $i++) { if (is_object($items[$i]) && get_class($items[$i]) == 'jqmHeader') { $this->_header = $this->add($items[$i], true); } if (is_object($items[$i]) && get_class($items[$i]) == 'jqmContent') { $this->_content = $this->add($items[$i], true); } if (is_object($items[$i]) && get_class($items[$i]) == 'jqmFooter') { $this->_footer = $this->add($items[$i], true); } } } if (!$this->_header) { $this->_header = $this->add(new jqmHeader(), true); } if (!$this->_content) { $this->_content = $this->add(new jqmContent(), true); } if (!$this->_footer) { $this->_footer = $this->add(new jqmFooter(), true); } $this->_role = $this->attribute('data-role', 'page', true); $this->_fullscreen = $this->attribute('data-fullscreen', $fullscreen ? 'true' : '', true); $this->_nobackbtn = $this->attribute('data-add-back-btn', $nobackbtn ? 'true' : '', true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param string $title * @param bool $collapsed */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $title = '', $collapsed = true) { parent::__construct('div', $id, $attributes, '', $theme); $this->_role = $this->attribute('data-role', 'collapsible', true); $this->_collapsed = $this->attribute('data-collapsed', $collapsed ? 'true' : 'false', true); $this->_title = $this->add(new jqmTitle($title), true); $this->items()->addFromArray($items); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '') { parent::__construct('div', $id, $attributes, $items, $theme); $this->_role = $this->attribute('data-role', 'navbar', true); $this->items()->prefix('<ul><li>'); $this->items()->separator('</li><li>'); $this->items()->suffix('</li></ul>'); }
/** * * @param string $id * @param string $name * @param string $label * @param array $items * @param string $theme * @param bool $fieldContain * @param string $icon * @param bool $inline */ function __construct($id = '', $name = '', $label = '', $items = array(), $theme = '', $fieldContain = false, $icon = '', $inline = false) { parent::__construct('select', $id, '', $items, $theme); $this->_name = $this->addAttribute(new jqmAttribute('name', $name, true), true); $this->_label = new jqmLabel('', $label, $name); $this->_fieldContain = $fieldContain; $this->_icon = $this->attribute('data-icon', $icon, true); $this->_inline = $this->attribute('data-inline', $inline ? 'true' : '', true); }
/** * * @param string $id * @param string $href * @param string $text * @param string $icon * @param string $theme * @param bool $active * @param bool $inline */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $href = '', $text = '', $icon = '', $active = false, $inline = false) { parent::__construct('a', $id, $attributes, $items, $theme); $this->_href = $this->attribute('href', $href, true); $this->_icon = $this->attribute('data-icon', $icon, true); $this->_role = $this->attribute('data-role', 'button', true); $this->active($active); $this->_inline = $this->attribute('data-inline', $inline ? 'true' : '', true); $this->_text = $this->add(new jqmText($text), true); }
/** * * @param string $id * @param string $legend * @param array $items * @param string $theme * @param string $dataType * @param bool $fieldContain */ function __construct($id = '', $legend = '', $items = array(), $theme = '', $dataType = 'vertical', $fieldContain = false) { parent::__construct('fieldset', $id, '', '', $theme); $this->_legend = $this->add(new jqmTag('legend', '', '', $legend), true); if (is_array($items)) { $this->items()->addFromArray($items); } $this->_role = $this->attribute('data-role', 'controlgroup', true); $this->_dataType = $this->attribute('data-type', $dataType, true); $this->_fieldContain = $fieldContain; }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param bool $inset * @param bool $filter * @param bool $ordered * @param string $splitIcon * @param string $splitTheme * @param string $dividerTheme * @param string $countTheme */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $inset = false, $filter = false, $ordered = false, $splitIcon = '', $splitTheme = '', $dividerTheme = '', $countTheme = '') { parent::__construct($ordered ? 'ol' : 'ul', $id, $attributes, $items, $theme); $this->_role = $this->attribute('data-role', 'listview', true); $this->_inset = $this->attribute('data-inset', $inset ? 'true' : '', true); $this->_filter = $this->attribute('data-filter', $filter ? 'true' : '', true); $this->_splitIcon = $this->attribute('data-split-icon', $splitIcon, true); $this->_splitTheme = $this->attribute('data-split-theme', $splitTheme, true); $this->_dividerTheme = $this->attribute('data-divider-theme', $dividerTheme, true); $this->_countTheme = $this->attribute('data-count-theme', $countTheme, true); }
/** * * @param string $xmlns * @param string $charset * @param string $title * @param string $css * @param string $jq * @param string $jqm */ function __construct($xmlns = JQMPHP_XMLNS, $charset = JQMPHP_CHARSET, $title = JQMPHP_TITLE, $css = JQMPHP_CSS, $jq = JQMPHP_JQ, $jqm = JQMPHP_JQM) { parent::__construct('head'); $this->_xmlns = $this->attribute('xmlns', $xmlns, true); $this->_charset = new jqmAttribute('charset', $charset); $this->add(new jqmTag('meta', '', array($this->_charset))); $this->_css = $this->add(new jqmLink($css), true); $this->_jq = $this->add(new jqmScript($jq), true); $this->_jqm = $this->add(new jqmScript($jqm), true); $this->_title = new jqmText($title); $this->add(new jqmTag('title', '', '', array($this->_title))); }
/** * * @param string $id * @param string $name * @param string $type * @param string $value * @param string $label * @param string $theme */ function __construct($id, $name = '', $type = 'text', $value = '', $label = '', $theme = '', $fieldContain = false) { if ($name == '') { $name = $id; } parent::__construct('input', $id, '', '', $theme); $this->_type = $this->addAttribute(new jqmAttribute('type', $type, true), true); $this->_name = $this->addAttribute(new jqmAttribute('name', $name, true), true); $this->_value = $this->addAttribute(new jqmAttribute('value', $value, true), true); $this->_label = new jqmLabel('', $label, $name); $this->_fieldContain = $fieldContain; }
/** * * @param string $id * @param string $name * @param string $label * @param bool $isOn * @param string $onLabel * @param string $onValue * @param string $offLabel * @param string $offValue * @param string $theme * @param bool $fieldContain */ function __construct($id = '', $name = '', $label = '', $isOn = false, $onLabel = 'on', $onValue = 'on', $offLabel = 'off', $offValue = 'off', $theme = '', $fieldContain = false) { parent::__construct('select', $id, '', '', $theme); $this->_role = $this->attribute('data-role', 'slider', true); $this->_name = $this->addAttribute(new jqmAttribute('name', $name, true), true); $this->_isOn = $isOn; $this->_label = new jqmLabel('', $label, $name); $this->_fieldContain = $fieldContain; $this->_off = $this->add(new jqmTag('option', '', array(new jqmAttribute('value', $offValue), new jqmAttribute('selected', '')), $offLabel), true); $this->_on = $this->add(new jqmTag('option', '', array(new jqmAttribute('value', $onValue), new jqmAttribute('selected', '')), $onLabel), true); $this->isOn($this->_isOn); }
/** * * @param string $id * @param array $attributes * @param array $items * @param bool $divider * @param string $title * @param string $href * @param string $count * @param string $img * @param string $subTitle * @param bool $isThumb * @param string $splitHref */ function __construct($id = '', $attributes = array(), $items = array(), $divider = false, $title = '', $href = '', $count = '', $img = '', $subTitle = '', $isThumb = false, $splitHref = '') { parent::__construct('li', $id, $attributes, $items); $this->_divider = $this->attribute('data-role', $divider ? 'list-divider' : '', true); $this->_title = $title; $this->_href = $href; $this->_count = $count; $this->_img = $img; $this->_subTitle = $subTitle; $this->_isThumb = $isThumb; $this->_splitHref = $splitHref; }
/** * * @param string $id * @param string $name * @param string $text * @param string $cols * @param string $rows * @param string $label * @param string $theme * @param bool $fieldContain */ function __construct($id, $name = '', $text = 'text', $cols = '', $rows = '', $label = '', $theme = '', $fieldContain = false) { if ($name == '') { $name = $id; } parent::__construct('textarea', $id, '', '', $theme); $this->_name = $this->addAttribute(new jqmAttribute('name', $name, true), true); $this->_cols = $this->addAttribute(new jqmAttribute('cols', $cols, true), true); $this->_rows = $this->addAttribute(new jqmAttribute('rows', $rows, true), true); $this->_text = $this->add(new jqmText($text), true); $this->_label = new jqmLabel('', $label, $name); $this->_fieldContain = $fieldContain; }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param string $title * @param string $position */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $title = '', $position = 'inline', $uiBar = false) { parent::__construct('div', $id, $attributes, $items, $theme); if (get_class($this) == 'jqmHeader') { $role = 'header'; } if (get_class($this) == 'jqmFooter') { $role = 'footer'; } $this->_role = $this->attribute('data-role', $role, true); $this->_position = $this->attribute('data-position', $position, true); $this->_uiBar = $this->attribute('class', $uiBar ? 'ui-bar' : '', true); $this->_title = $this->add(new jqmTitle($title), true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param string $action * @param string $method */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $action = '', $method = 'POST') { parent::__construct('form', $id, $attributes, $items, $theme); $this->_action = $this->attribute('action', $action, true); $this->_method = $this->attribute('method', $method, true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '') { parent::__construct('div', $id, $attributes, $items, $theme); $this->_role = $this->attribute('data-role', 'fieldcontain', true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '') { parent::__construct('div', $id, $attributes, $items, $theme); $this->attribute('data-inline', 'true'); }
/** * * @param string $id * @param string $text * @param string $forField */ function __construct($id = '', $text = '', $forField = '') { parent::__construct('label', $id); $this->_text = $this->add(new jqmText($text), true); $this->_forField = $this->attribute('for', $forField, true); }
/** * * @param string $id * @param string $type * @param array $a * @param array $b * @param array $c * @param array $d * @param array $e */ function __construct($id = '', $type = 'a', $a = array(), $b = array(), $c = array(), $d = array(), $e = array()) { if (is_string($a) && $a != '') { $a = array($a); } if (is_string($b) && $b != '') { $b = array($b); } if (is_string($c) && $c != '') { $c = array($c); } if (is_string($d) && $d != '') { $d = array($d); } if (is_string($e) && $e != '') { $e = array($e); } if (!is_array($a)) { $a = array(); } if (!is_array($b)) { $b = array(); } if (!is_array($c)) { $c = array(); } if (!is_array($d)) { $d = array(); } if (!is_array($e)) { $e = array(); } parent::__construct('div', $id); $this->grid($type); $this->_a = $this->add(new jqmCollection($a), true); $this->_b = $this->add(new jqmCollection($b), true); $this->_c = $this->add(new jqmCollection($c), true); $this->_d = $this->add(new jqmCollection($d), true); $this->_e = $this->add(new jqmCollection($e), true); $this->_a->prefix('<div class="ui-block-a">')->suffix('</div>'); $this->_b->prefix('<div class="ui-block-b">')->suffix('</div>'); $this->_c->prefix('<div class="ui-block-c">')->suffix('</div>'); $this->_d->prefix('<div class="ui-block-d">')->suffix('</div>'); $this->_e->prefix('<div class="ui-block-e">')->suffix('</div>'); }
/** * * @param string $id * @param array $attributes * @param array $items * @param array $pages */ function __construct($id = '', $attributes = array(), $items = array(), $pages = array()) { parent::__construct('body', $id, $attributes, $items); $this->_pages = $this->add(new jqmCollection($pages), true); }
/** * * @param string $id * @param array $attributes * @param array $items * @param string $theme * @param string $dataType */ function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $dataType = 'vertical') { parent::__construct('div', $id, $attributes, $items, $theme); $this->_role = $this->attribute('data-role', 'controlgroup', true); $this->_dataType = $this->attribute('data-type', $dataType, true); }
/** * * @param string $src */ function __construct($src = '') { parent::__construct('script'); $this->attribute('type', 'text/javascript'); $this->_src = $this->attribute('src', $src, true); }