public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof MediaElement) { $this->setTagName('DIV'); $this->addClass('media-body'); } if ($this->getParent()->hasClass('modal-content')) { $this->setTagName('DIV'); $this->addClass('modal-body'); } if ($this->getParent() instanceof TabElement) { $tabs = $this->findParent('UL'); $this->setTagName('DIV'); if ($tabs instanceof TabsElement) { $id = 'xtpl-boostrap-tab-' . $this->getParent()->getAttribute('NAME'); $this->setAttribute('ID', $id); $this->addClass('tab-pane'); if ($this->getParent()->hasClass('active')) { $this->addClass('active'); } if ($tabs->hasClass('fade')) { $this->addClass('fade'); if ($this->hasClass('active')) { $this->addClass('in'); } } $ce = $tabs->getContentElement(); $ce->addChild($this); } } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof DropdownElement) { $this->setTagName('LI'); $this->addClass('dropdown-header'); } if ($this->getParent() instanceof NavbarElement) { $this->addClass('navbar-header'); } if ($this->getParent()->hasClass('media-body')) { $size = 4; if ($this->hasAttribute('SIZE')) { $this->ignoreAttribute('SIZE'); $size = intval($this->getAttribute('SIZE')); } $this->setTagName("H{$size}"); $this->addClass('media-heading'); } if ($this->getParent()->hasClass('list-group-item')) { $size = 4; if ($this->hasAttribute('SIZE')) { $this->ignoreAttribute('SIZE'); $size = intval($this->getAttribute('SIZE')); } $this->setTagName("H{$size}"); $this->addClass('list-group-item-heading'); } if ($this->getParent()->hasClass('modal-content')) { $this->addClass('modal-header'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof ListgroupElement) { $this->addClass('list-group-item'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof Media\ListElement) { $this->setTagName('LI'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof PanelElement) { $this->addClass('panel-footer'); } if ($this->getParent()->hasClass('modal-content')) { $this->addClass('modal-footer'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if (($this->getParent() instanceof HeaderElement || $this->getParent() instanceof FooterElement) && $this->getParent(2) instanceof PanelElement) { $size = 4; if ($this->hasAttribute('SIZE')) { $this->ignoreAttribute('SIZE'); $size = intval($this->getAttribute('SIZE')); } $this->setTagName("H{$size}"); $this->addClass('panel-title'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof PElement && $this->getParent()->hasClass('navbar-text')) { $this->addClass('navbar-link'); } if ($this->getParent() instanceof AlertElement) { $this->addClass('alert-link'); } if ($this->getParent() instanceof ListgroupElement) { $this->addClass('list-group-item'); $this->getParent()->setTagName('DIV'); } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->hasAttribute('TYPE')) { switch ($this->getAttribute('TYPE')) { case 'inline': $labels = $this->find('LABEL'); foreach ($labels as $label) { $label->addClass('radio-inline'); } $this->display = false; break; } } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof NavbarElement || ($this->getParent() instanceof CollapseElement || $this->getParent() instanceof HeaderElement) && $this->getParent()->getParent() instanceof NavbarElement) { $this->addClass('navbar-form'); if ($this->hasAttribute('ALIGN')) { $this->ignoreAttribute('ALIGN'); switch ($this->getAttribute('ALIGN')) { case 'left': $this->addClass('navbar-left'); break; case 'right': $this->addClass('navbar-right'); } } } } return parent::process(); }
public function process() { if (!$this->isProcessed()) { if ($this->getParent() instanceof Input\GroupElement) { $span = new SpanElement(array('CLASS' => 'input-group-btn')); $this->getParent()->insertBefore($this, $span); $span->addChild($this); } if ($this->getParent() instanceof NavbarElement || ($this->getParent() instanceof CollapseElement || $this->getParent() instanceof HeaderElement) && $this->getParent()->getParent() instanceof NavbarElement) { $this->addClass('navbar-btn'); if ($this->hasAttribute('ALIGN')) { $this->ignoreAttribute('ALIGN'); switch ($this->getAttribute('ALIGN')) { case 'left': $this->addClass('navbar-left'); break; case 'right': $this->addClass('navbar-right'); } } } } return parent::process(); }