Generate the nestable html

@param null $parent

@return string
489652
private function getNavigationHtml($parent = null)
    {
        $html = '<ol class="dd-list">';

        if (!(isset($parent) && $parent)) {
            $items = NavigationAdmin::whereParentIdORM(0, true);
        }
        else {
            $items = NavigationAdmin::whereParentIdORM($parent->id, true);
        }

        foreach ($items as $key => $nav) {
            $html .= '<li class="dd-item" data-id="' . $nav->id . '">';
            $html .= '<div class="dd-handle">' . (strlen($nav->icon) > 1 ? '<i class="fa-fw fa fa-' . $nav->icon . '"></i> ' : '');
            $html .= $nav->title . ' ' . ($nav->is_hidden == 1? '(HIDDEN)':'') . ' <span style="float:right"> ' . $nav->url . ' </span></div>';
            $html .= $this->getNavigationHtml($nav);
            $html .= '</li>';
        }

        $html .= '</ol>';

        return (count($items) >= 1 ? $html : '');
    }
1269562
public function content($parentView = null)
    {
        if ($parentView === null) {
            $content                 = ob_get_clean();
            ob_clean();
            $this->params['scripts'] = $this->generateScripts();
            $this->params['css']     = $this->generateCSS();
            echo $this->render($this->parentLayout,
                array_merge($this->getBlocks(), $this->params,
                    ['content' => $content])
            );
        } else {
            $this->parentLayout = $parentView;
            ob_start();
        }
    }
485714
public function toXML(DOMElement $parent = null) : DOMElement
    {
        if ($parent === null) {
            $doc = DOMDocumentFactory::create();
            $e = $doc->createElementNS(Constants::NS_MD, 'md:EntitiesDescriptor');
            $doc->appendChild($e);
        } else {
            $e = $parent->ownerDocument->createElementNS(Constants::NS_MD, 'md:EntitiesDescriptor');
            $parent->appendChild($e);
        }

        if ($this->ID !== null) {
            $e->setAttribute('ID', $this->ID);
        }

        if ($this->validUntil !== null) {
            $e->setAttribute('validUntil', gmdate('Y-m-d\TH:i:s\Z', $this->validUntil));
        }

        if ($this->cacheDuration !== null) {
            $e->setAttribute('cacheDuration', $this->cacheDuration);
        }

        if ($this->Name !== null) {
            $e->setAttribute('Name', $this->Name);
        }

        Extensions::addList($e, $this->Extensions);

        /** @var \SAML2\XML\md\EntityDescriptor|\SAML2\XML\md\EntitiesDescriptor $node */
        foreach ($this->children as $node) {
            $node->toXML($e);
        }

        $this->signElement($e, $e->firstChild);

        return $e;
    }
1311436
public function html(string $html, array $parentAttributes = [])
    {
        return $this->add(Html::raw($html)->setParentAttributes($parentAttributes));
    }
378709
private function get_parent_link_html()
    {
        global $post;

        if (! empty($post) && $this->parent_page_id == $post->ID) {
            $li_class = $this->args['li_active_class'] . ' ' . $this->args['li_class'];
            $link_class = $this->args['link_active_class'] . ' ' . $this->args['link_class'];
        } else {
            $li_class = $this->args['li_class'];
            $link_class = $this->args['link_class'];
        }

        return \sprintf(
            '<li class="%s">%s<a class="%s" href="%s">%s%s%s</a>%s</li>',
            $li_class,
            $this->args['before_link'],
            $link_class,
            get_the_permalink($this->parent_page_id),
            $this->args['before_text'],
            get_the_title($this->parent_page_id),
            $this->args['after_text'],
            $this->args['after_link']
        );
    }
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
145594
private function setParent(&$parent)
    {
        if (! is_null($parent)) {
            $this->parent = $parent;

            $this->parent->elements->add($this);
        }

        return $this;
    }
656320
public function renderControls($parent)
	{
		if (!($parent instanceof Nette\Forms\Container || $parent instanceof Nette\Forms\ControlGroup)) {
			throw new Nette\InvalidArgumentException('Argument must be Nette\Forms\Container or Nette\Forms\ControlGroup instance.');
		}
		$html = Html::el();
		$hidden = Html::el();

		// note that these are NOT form groups, these are groups specified to group
		foreach ($parent->getControls() as $control) {
			if ($control->getOption(RendererOptions::_rendered, FALSE)) {
				continue;
			}

			if ($control instanceof BootstrapRow) {
				$html->addHtml($control->render());
			} else {
				if ($control->getOption(RendererOptions::type) == 'hidden') {
					$isHidden = TRUE;
					$pairHtml = $this->renderControl($control);
				} else {
					$pairHtml = $this->renderPair($control);
					$isHidden = FALSE;
				}

				if ($this->groupHidden && $isHidden) {
					$hidden->addHtml($pairHtml);
				} else {
					$html->addHtml($pairHtml);
				}
			}
		}

		$html->addHtml($hidden);

		return $html;
	}
1236757
public function toXML(DOMElement $parent) : DOMElement
    {
        $e = parent::toXML($parent);

        if (is_bool($this->AuthnRequestsSigned)) {
            $e->setAttribute('AuthnRequestsSigned', $this->AuthnRequestsSigned ? 'true' : 'false');
        }

        if (is_bool($this->WantAssertionsSigned)) {
            $e->setAttribute('WantAssertionsSigned', $this->WantAssertionsSigned ? 'true' : 'false');
        }

        foreach ($this->AssertionConsumerService as $ep) {
            $ep->toXML($e, 'md:AssertionConsumerService');
        }

        foreach ($this->AttributeConsumingService as $acs) {
            $acs->toXML($e);
        }

        return $e;
    }
894834
public function render($html = null) {
		if ($this->_tagCached === null) {
			$tag = '<' . $this->_tag;
			
			// Classes
			if (! empty($this->_classes)) {
				$this->setAttr(
					self::ATTR_CLASS,
					implode(' ', $this->_classes)
				);
			}

			// Style
			if (! empty($this->_style)) {
				$style = [];
				
				foreach ($this->_style as $param => $value) {
					$style[] = $param . ':' . $value . ';';
				}
				
				$this->setAttr(
					self::ATTR_STYLE,
					implode(' ', $style)
				);
			}

			// Attrs
			if (! empty($this->_attrs)) {
				$attrs = [];
				
				foreach ($this->_attrs as $attr => $value) {
					$attrs[] = $attr . '="' . $value . '"';
				}

				$tag .= ' ' .  implode(' ', $attrs);
			}
			
			$tag .= $this->_closed ? ' />' : '>';
			
			$this->_tagCached = $tag;
		}
		
		if ($this->_closed) {
			return $this->_tagCached;
		}
			
		return $this->_tagCached . ($html === null ? $this->_html : $html) . '</' . $this->_tag . '>';
	}
19381
public function generate($page = null)
    {
        $this->__build();
        parent::generate($page);
        return $this->Html->generate(true);
    }
1133054
public function html() {
    if (!$this->isMorphed())
      $this->morph();
      
    $html = NULL;
    foreach ($this->elements as $el) {
      $html .= $el->html()."\n";
    }
      
    return $html;
  }
642155
public function toXML(DOMElement $parent) : DOMElement
    {
        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
        $parent->appendChild($e);

        if ($this->Id !== null) {
            $e->setAttribute('Id', $this->Id);
        }

        foreach ($this->info as $n) {
            $n->toXML($e);
        }

        return $e;
    }
856449
public function render($html = null) {
		$link = $this->getAnchor()->render();
		
		if ($html !== null) {
			$link .= $this->getSeparator();
			$link .= $html;
		}
		
		return parent::render($link);
	}
410101
public function bindParent($parent, $parentPropertyName = null)
    {
        $this->parent = $parent;
        $this->parentPropertyName = $parentPropertyName;
        return $this;
    }
504915
public function html() {
    if (($el = $this->getElement()) === NULL) return NULL;
    
    return implode('',xml::export($el->childNodes));
  }
675021
public function toXML(DOMElement $parent) : DOMElement
    {
        $doc = $parent->ownerDocument;

        $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:X509Data');
        $parent->appendChild($e);

        /** @var \SAML2\XML\Chunk|\SAML2\XML\ds\X509Certificate $n */
        foreach ($this->getData() as $n) {
            $n->toXML($e);
        }

        return $e;
    }