public function __construct($data = null, $attributes = null, $childNodes = null, $parentNode = null) { parent::__construct('table', $attributes, $childNodes, $parentNode); if (isset($data)) { $this->body($data); } }
public function __construct($tagName = 'style', $attributes = array(), $childNodes = null, $parentNode = null) { $this->rules = new ar_cssRules($this); if (!$attributes) { $attributes = array(); } if (!$attributes['type']) { $attributes['type'] = 'text/css'; } parent::__construct($tagName, $attributes, null, $parentNode); }
public function __construct($tagName = 'ul', $attributes = array(), $childNodes = null, $parentNode = null) { if (!$attributes['class'] && !$attributes['id']) { $attributes['class'] = 'menu'; } if (!$tagName) { $tagName = 'ul'; } $this->options['listTag'] = $tagName; switch ($tagName) { case 'ul': case 'ol': $this->options['itemTag'] = 'li'; break; case 'dl': $this->options['itemTag'] = 'dt'; break; default: $this->options['itemTag'] = $tagName; break; } if (!$childNodes instanceof ar_htmlNodes) { $childNodes = null; } parent::__construct($tagName, $attributes, $childNodes, $parentNode); $this->items['[root]'] = $this; $context = ar::context(); $me = $context->getObject(); if ($me) { $this->root = $me->currentsite(); $this->rooturl = $me->make_local_url($this->root); } if (!isset($this->root)) { $this->root = '/'; $this->rooturl = '/'; } $this->current = $this->root; $listTag = $this->options['listTag']; $itemTag = $this->options['itemTag']; if ($this->attributes['id']) { $prefix = '#' . $this->attributes['id']; } else { $prefix = $listTag . '.' . $this->attributes['class']; } $this->prefix = $prefix; $this->css = ar_css::stylesheet()->import("\n\t\t\t\t{$prefix}, {$prefix} {$listTag} {\n\t\t\t\t\tlist-style: none;\n\t\t\t\t\tmargin: 0px;\n\t\t\t\t\tpadding: 0px;\n\t\t\t\t}\n\n\t\t\t\t{$prefix} {$itemTag} {\n\t\t\t\t\tmargin: 0px;\n\t\t\t\t\tpadding: 0px;\n\t\t\t\t}\n\n\t\t\t\t{$prefix} {$itemTag} a {\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\t\t\t"); }