/** * Constructor of the class * * @param Array $panes List of panes * @param String $active Active pane * @param String $content Content of the active pane * * @return Void */ public function __construct($panes, $active, $content) { parent::__construct('', '', '', ''); $this->panes = $panes; $this->activePane = $active; $this->content = $content; }
public function __construct($href = '') { $this->_tag = 'base'; parent::__construct(); $this->_unpaired = true; $this->_attributes->register('id'); $this->_attributes->register('href', $href); }
public function __construct($data, $tabs_only = false) { parent::__construct(); $this->tabs_only = $tabs_only; $this->root = $this->createElement('div', null, array('id' => $this->tabId)); $this->createTabs($data); $this->appendChild($this->root); }
public function __construct($label, $name, $value, $with_none = false, $onchange = "", $desc = "") { parent::__construct($label, $name, $value, $desc); $this->options = array(); $this->onchange = $onchange; if ($with_none) { $this->addOption(new HTML_Element_Option($GLOBALS['Language']->getText('global', 'none_dashed'), "", $this->value === "" || $this->value === null)); } }
public function __construct($type = null) { $this->_tag = 'style'; parent::__construct(); $this->_attributes->register('id'); $this->_attributes->register('type', $type); $this->_attributes->register('media'); $this->_attributes->register('title'); $this->_attributes->register('space'); }
public function __construct($name = null, $content = '', $http_equiv = null) { $this->_tag = 'meta'; parent::__construct(); $this->_unpaired = true; $this->_attributes->register('id'); $this->_attributes->register('http-equiv', $http_equiv); $this->_attributes->register('name', $name); $this->_attributes->register('content', $content); $this->_attributes->register('scheme'); }
/** * Tabs constructor * @param array $args Array of [ 'id' ], [ 'classes' ] and [ 'params' ] * @package Skip * @since 1.0 */ function __construct($args = array()) { /* * Additional parent args: * 'id' * 'classes' * 'before_element' * 'after_element' * 'params' */ parent::__construct('div', $args); }
public function __construct($type = '', $src = null) { $this->_tag = 'script'; parent::__construct(); $this->_text = ''; $this->_raw = true; $this->_attributes->register('charset'); $this->_attributes->register('type', $type); $this->_attributes->register('src', $src); $this->_attributes->register('defer'); $this->_attributes->register('space'); }
public function __construct($id, $start, $link, $count, $per = 10, $page_numbers = true) { parent::__construct(); if ($start < 0 || $start > $count) { $start = 0; } $link = stripslashes($link); $current = floor($start / $per) + 1; $current_records = $start + 1 . '-' . ($current * $per > $count ? $count : $current * $per); $pages = ceil($count / $per); $this->vars = array('id' => 'paginate_' . $id, 'current_records' => $current_records, 'count' => $count, 'current' => $current, 'previous' => $previous, 'next' => $next, 'link' => $link, 'pages' => $pages, 'per' => $per, 'start' => $start, 'page_numbers' => $page_numbers); $this->make(); }
/** * Accordion constructor * @param array $args Optional * @package Skip * @since 1.0 */ function __construct($args = array()) { /* * Additional parent args: * 'id' * 'classes' * 'before_element' * 'after_element' * 'params' */ $defaults = array('tag' => 'div', 'title_tag' => 'h3', 'content_tag' => 'div'); $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); parent::__construct($tag, $args); $this->title_tag = $title_tag; $this->content_tag = $content_tag; }
public function __construct($id = null, $class_name = null, $style = null, $title = null) { parent::__construct(); $this->_attributes->register('id', $id); $this->_attributes->register('class', $class_name); $this->_attributes->register('style', $style); $this->_attributes->register('title', $title); // originally intended to use Var_Pool, but Typed_Var_Pool wastes less memory // $this->_tag has to be defined at this point $this->_events = new Typed_Var_Pool($this->_tag . '#e'); $this->_events->register('onclick'); $this->_events->register('ondblclick'); $this->_events->register('onmousedown'); $this->_events->register('onmouseup'); $this->_events->register('onmouseover'); $this->_events->register('onmousemove'); $this->_events->register('onmouseout'); $this->_events->register('onkeypress'); $this->_events->register('onkeydown'); $this->_events->register('onkeyup'); }
/** * WP Form constructor * * @package Skip * @since 1.0 * * @param string $name The name of the form * @param string $args Array of [ 'id' ], [ 'classes' ], [ 'before_element' ], [ 'after_element' ] and [ 'params' ] */ function __construct($name, $args = array()) { global $skip_form_name; /* * Additional parent args: * 'id' * 'classes' * 'before_element' * 'after_element' * 'params' */ $defaults = array('enctype' => 'multipart/form-data', 'classes' => 'skip_form'); $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); if ('' == $name) { return; } $method = 'POST'; $action = $_SERVER['REQUEST_URI']; $args['close_tag'] = TRUE; parent::__construct('form', $args); $skip_form_name = $name; $this->add_param('name', $name); if ('' != $method) { $this->add_param('method', $method); } if ('' != $action) { $this->add_param('action', $action); } if ('' != $enctype) { $this->add_param('enctype', $enctype); } // Needed Fields for Form $needed_fields = wp_nonce_field('skip_form_' . $name, $name . '_wpnonce', TRUE, FALSE); $needed_fields .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . max_upload() . '" />'; $this->add_element($needed_fields); }
public function __construct() { parent::__construct(); $this->_elements = array(); }
public function __construct($text = '') { parent::__construct(); $this->_text = $text; }
public function __construct() { $this->_tag = 'title'; parent::__construct(); $this->_text = ''; }
public function __construct($code = '') { parent::__construct(); $this->_code = $code; }
/** * Constructor * * Accepts any HTML_Element as parameter. * Each HTML_Element will be displayed in its own column * * Usage: * <code> * $c = new ComponentsHTML_Columns( * new HTML_Element_Input_Text(), * new HTML_Element_Input_Text(), * new HTML_Element_Textarea(), * ); * </code> */ function __construct() { parent::__construct(null, null, null); $this->components = func_get_args(); }
public function __construct() { parent::__construct(); }
public function __construct($registry) { $this->registry = $registry; parent::__construct(); }
/** * Constructor * @package Skip * @since 1.0 * @param string $tag The HTML Tag to use for element * @param string $name The name of the element where to save data * @param array $args Arguments */ function __construct($tag, $name, $args = array()) { global $skip_form_name; /* * Additional parent args: * 'id' * 'classes' * 'before_element' * 'after_element' * 'params' */ $defaults = array('label' => '', 'description' => '', 'default' => FALSE, 'value' => '', 'array' => '', 'save' => TRUE, 'disabled' => FALSE, 'form_name' => $skip_form_name, 'errors' => array(1 => __('Form could not be verified. Field could not be saved.', 'skip_framework'), 2 => sprintf(__('Upload limit exceeded. %s Bytes uploaded, %s Bytes allowed. Please try to upload one file after another or choose a smaller file.', 'skip_framework'), array_key_exists('CONTENT_LENGTH', $_SERVER) ? $_SERVER['CONTENT_LENGTH'] : 0, max_upload()))); $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); parent::__construct($tag, $args); $this->form_name = $form_name; $this->name = $name; $this->save = $save; $this->default = $default; // Setting up Array if (!is_array($array)) { $this->array = explode(',', $array); // For Values by param String if (count($this->array) == 1) { $this->array = $this->array[0]; } // If array is given } else { $this->array = $array; } $this->errors = $errors; $this->field_name = $this->field_name(); // Name of HTML Field $this->option_name = $this->option_name(); // Name of WP Option Field if ($save) { $this->save(); } // Register for saving if ('' == $value) { $this->value = $this->value(); } else { $this->value = $value; } // Setting up Tag $this->add_param('name', $this->field_name); $this->add_param('value', $this->value); if (TRUE == $disabled) { $this->add_param('disabled', 'disabled'); } $this->before('<div class="skip_field">'); if ('' != $label) { $this->before('<div class="skip_field_row skip_field_row_' . $this->params['id'] . '"><label for="' . $this->params['id'] . '">' . $label . '</label><div class="skip_row_content">'); } if ('' != $description) { $this->after('<div class="skip_field_description skip_field_description_' . $this->params['id'] . '">' . $description . '</div>'); } if ('' != $label) { $this->after('</div><div class="clear"></div></div>'); } $this->after('</div>'); }
public function __construct($label, $value, $selected = false) { parent::__construct($label, '', $value); $this->setSelected($selected); }