Render the element as a child

@param  Descriptor   $descriptor
@param  string | int $linkTitle
@return string
500994
protected function renderChildElement(Descriptor $descriptor, $linkTitle) {
		$element = $this->renderElement($descriptor);
		$link    = $this->getTagsLocator()->get('link');

		if (is_string($linkTitle)) {
			return $element . $link->render($linkTitle);
		}

		return $element . $link->render();
	}
210465
public function render($renderer, $sub = false, $inat = true)
    {
        if (!empty($this->attrs['wt_style'])) {
            $renderer->setCurrentStyle($this->attrs['wt_style']);
        }

        $this->text = $this->getStart() . $this->text;
        foreach ($this->elements as $element) {
            if ($element === 'footnotetexts') {
                $renderer->footnotes();
            } elseif ($element === 'addpage') {
                $renderer->addPage();
            } elseif ($element instanceof ReportBaseHtml) {
                $element->render($renderer, true, false);
            } else {
                $element->render($renderer);
            }
        }
        $this->text .= $this->getEnd();
        if ($sub) {
            return $this->text;
        }

        // If not called by an other attribute
        if ($inat) {
            $startX = $renderer->getX();
            $startY = $renderer->getY();
            $width  = $renderer->getRemainingWidth();
            echo '<div style="position: absolute;top: ', $startY, 'pt;', $renderer->alignRTL, ': ', $startX, 'pt;width: ', $width, 'pt;">';
            $startY += $renderer->getCurrentStyleHeight() + 2;
            $renderer->setY($startY);
        }

        echo $this->text;

        if ($inat) {
            echo "</div>\n";
        }
    }
1276552
public function render(Descriptor $descriptor) {
		$style = file_get_contents(__DIR__ . '/Assets/style.css');
		
		$styleTag = new Tag('style', $style);
		
		$topologyTag = new Tag();
		$topologyTag->addClass('topology');
		
		return $styleTag->render() . $topologyTag->render($this->renderElement($descriptor));
	}
567835
public function srcset($images, $descriptor = 'w'): string
    {
        $r = '';
        $generated = [];

        if (!\is_array($images)) {
            return '';
        }

        foreach ($images as $image) {
            switch ($descriptor) {
                case 'w':
                    if (!isset($generated[$image->getWidth()])) {
                        $r .= $image->getUrl().' '.$image->getWidth().'w, ';
                        $generated[$image->getWidth()] = true;
                    }
                    break;
                case 'h':
                    if (!isset($generated[$image->getHeight()])) {
                        $r .= $image->getUrl().' '.$image->getHeight().'h, ';
                        $generated[$image->getHeight()] = true;
                    }
                    break;
                case 'w+h':
                    $key = $image->getWidth().'x'.$image->getHeight();
                    if (!isset($generated[$key])) {
                        $r .= $image->getUrl().' '.$image->getWidth().'w '.$image->getHeight().'h, ';
                        $generated[$image->getWidth().'x'.$image->getHeight()] = true;
                    }
                    break;
            }
        }

        return $r !== '' ? substr($r, 0, -2) : '';
    }
646612
public function renderSelf($layout = null, $title = null)
    {
        return $this->getController()->customise([
            'TitleText' => $title
        ])->renderWith(parent::class);
    }
358456
protected function renderElementInner(Descriptor $descriptor) {
		$tagsLocator = $this->getTagsLocator();
		
		// Element's main
		$elementTag = new Tag();
		$elementTag->addClass('topology-element');
		
		$type = $descriptor->getType();
		
		if (isset(static::$types[$type])) {
			$elementTag->addClass(static::$types[$type]);
		}
		
		// Header
		$elementTag->appendHtml($this->renderHeaderContent($descriptor));
		
		// Body
		if ($descriptor->hasPropertities()) {
			$content = $this->renderBodyContent($descriptor);
			$elementTag->appendHtml($tagsLocator->body->render($content));
		} else {
			$elementTag->appendHtml($tagsLocator->body->render());
		}
		
		// Footer
		$elementTag->appendHtml($tagsLocator->footer->render());
		
		return $elementTag->render();
	}
114420
function serializeToJRD(descriptor) {
  var obj = {};
  if (descriptor.expires) { obj.expires = xsdDateTimeString(descriptor.expires); }
  if (descriptor.subject) { obj.subject = descriptor.subject; }
  if (descriptor.aliases.length > 0) {
    obj.aliases = [];
    descriptor.aliases.forEach(function(alias) {
      obj.aliases.push(alias);
    });
  }
  
  if (descriptor.properties.length > 0) {
    obj.properties = {};
    descriptor.properties.forEach(function(key, value) {
      obj.properties[key] = value;
    }, { flatten: true });
  }
  
  if (descriptor.links.length > 0) {
    obj.links = [];
    descriptor.links.forEach(function(link) {
      var l = {};
      if (link.rel) { l.rel = link.rel; }
      if (link.href) { l.href = link.href; }
      if (link.template) { l.template = link.template; }
      if (link.type) { l.type = link.type; }
      
      if (link.titles.length > 0) {
        l.titles = {};
        link.titles.forEach(function(lang, title) {
          if (lang === '_') {
            l.titles['default'] = title;
          } else {
            l.titles[lang] = title;
          }
        }, { flatten: true });
      }
      
      if (link.properties.length > 0) {
        l.properties = {};
        link.properties.forEach(function(key, value) {
          l.properties[key] = value;
        }, { flatten: true });
      }
      
      obj.links.push(l);
    });
  }
  
  return JSON.stringify(obj);
}
55928
public function renderContent($content, $title = null)
    {
        if ($content instanceof Renderable) {
            $content = $content->render();
        }

        return $this->admin->template()->view('_layout.inner')
            ->with('title', $title)
            ->with('content', $content)
            ->with('breadcrumbKey', $this->parentBreadcrumb);
    }
948120
public function MoodleQuickForm_selectwithlink($elementName=null, $elementLabel=null, $options=null, $attributes=null, $linkdata=null) {
        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
        self::__construct($elementName, $elementLabel, $options, $attributes, $linkdata);
    }
842378
public function renderSelf($layout = null, $title = null)
    {
        // Verify Existence of Layout Section + Layout:
        
        if (!$this->hasEnabledChild(LayoutSection::class)) {
            return $this->renderNotFound($layout, $title, LayoutSection::singleton()->i18n_singular_name());
        } elseif (!$this->getChild(LayoutSection::class)->hasPageLayout()) {
            return $this->renderNotFound($layout, $title, Layout::singleton()->i18n_singular_name());
        }
        
        // Verify Existence of Page Component:
        
        if (!$this->hasEnabledDescendant(PageComponent::class)) {
            return $this->renderNotFound($layout, $title, PageComponent::singleton()->i18n_singular_name());
        }
        
        // Render Template Sections:
        
        return $this->renderChildren($layout, $title);
    }
967080
public function render(AbstractInline $inline, CliRenderer $renderer)
    {
        if (!($inline instanceof Link)) {
            throw new \InvalidArgumentException(sprintf('Incompatible inline type: "%s"', get_class($inline)));
        }

        return $renderer->style($renderer->renderInlines($inline->children()), ['underline', 'bold', 'light_blue']);
    }
640263
public function set_description($desc) {
        $xpath = new \DOMXpath($this);
        $general = $xpath->query(CC::lom_general_xpath)->item(0);
        $new_description = $this->add_child_ns(CC::LOMIMSCC_NS, $general, 'description');
        $new_string = $this->add_child_ns(CC::LOMIMSCC_NS, $new_description, 'string', $desc, array("language" => "en-US"));
    }
802291
protected function mapReflectorToDescriptor($reflector, $descriptor)
    {
        $descriptor->setFullyQualifiedStructuralElementName($reflector->getName() . '()');
        $descriptor->setName($reflector->getShortName());
        $descriptor->setVisibility($reflector->getVisibility() ? : 'public');
        $descriptor->setFinal($reflector->isFinal());
        $descriptor->setAbstract($reflector->isAbstract());
        $descriptor->setStatic($reflector->isStatic());
        $descriptor->setLine($reflector->getLinenumber());
    }
421002
public function renderInfo($title, $subtitle, $description = false)
    {
        $output = '<div class="info header">';
        $output .= "<h1>" . Convert::raw2xml($title) . "</h1>";
        if ($subtitle) {
            $output .= "<h3>" . Convert::raw2xml($subtitle) . "</h3>";
        }
        if ($description) {
            $output .= "<p>$description</p>";
        } else {
            $output .= $this->Breadcrumbs();
        }
        $output .= '</div>';

        return $output;
    }
754326
private function renderElement($page, $title, $class = '')
    {
        $href = sprintf($this->htmlHref, $this->currentUri, $page);
        $href .= $this->getUrlParams();

        $element = sprintf($this->htmlAHref, $href, $title);
        return sprintf($this->htmlElement, $class, $element);
    }
887351
public function renderSelf($layout = null, $title = null)
    {
        return $this->renderTag($this->getPageLayout()->render($layout, $title));
    }
1033064
function () {
                var children = [],
                    addedDescriptors = [],
                    i, child;

                if (this.$defaultContentName && this.$defaultTemplateName) {
                    throw "both $defaultContentName and $defaultTemplateName are defined";
                }

                var desc;

                function addChildren(childrenFromDescriptor, fromDescriptor) {

                    // don't add children with the same descriptor twice
                    for (var j = 0; j < childrenFromDescriptor.length; j++) {
                        child = childrenFromDescriptor[j];
                        child.$fromDescriptor = fromDescriptor;

                        if (child.$createdByTemplate || _.indexOf(addedDescriptors, child.$descriptor) === -1) {
                            children.push(child);
                            if (child.$descriptor) {
                                addedDescriptors.push(child.$descriptor);
                            }
                        }
                    }
                }

                for (var d = 0; d < this.$internalDescriptors.length; d++) {
                    desc = this.$internalDescriptors[d];
                    addChildren(this._getChildrenFromDescriptor(desc, this, null, this), "intern");
                }

                var externalDescriptorChildren;

                if (this.$defaultTemplateName) {
                    var templateBlock;

                    // go through all children from the external descriptor
                    // and check if a template block with the name $defaultTemplateName

                    for (i = 0; i < this.$descriptor.childNodes.length; i++) {
                        var node = this.$descriptor.childNodes[i];

                        if (node.nodeType === 1 &&
                            node.getAttribute("name") === this.$defaultTemplateName &&
                            this.$stage.$applicationContext.getFqClassName(node.namespaceURI, this._localNameFromDomNode(node), true) === "js/core/Template") {

                            templateBlock = node;
                            break;
                        }
                    }

                    if (!templateBlock && this.$descriptor) {
                        templateBlock = this.createComponent(Component.Template, {
                            name: this.$defaultTemplateName
                        }, this.$descriptor);

                        externalDescriptorChildren = [templateBlock];
                    }

                }

                externalDescriptorChildren = externalDescriptorChildren || this._getChildrenFromDescriptor(this.$descriptor);


                if (this.$defaultContentName && this.$descriptor) {
                    // check if content block is already defined
                    var contentBlock,
                        internAndExternalChildren = children.concat(externalDescriptorChildren);


                    for (i = 0; i < internAndExternalChildren.length; i++) {
                        child = internAndExternalChildren[i];

                        if (child instanceof Component.Content && child.$.name === this.$defaultContentName) {
                            // content block already defined
                            contentBlock = child;
                            break;
                        }
                    }

                    if (!contentBlock) {
                        // create a content block and move all children in a js.core.Content Block
                        contentBlock = this.createComponent(Component.Content, {
                            name: this.$defaultContentName
                        });

                        // add all children to content block
                        for (i = 0; i < externalDescriptorChildren.length; i++) {
                            contentBlock.addChild(externalDescriptorChildren[i]);
                        }

                        externalDescriptorChildren = [contentBlock];
                    }

                }

                addChildren(externalDescriptorChildren, "external");

                var extraChildren = this.createChildren();
                if (extraChildren) {
                    addChildren(extraChildren, "extra");
                }

                this._initializeChildren(children);

                this._childrenInitialized();

                this._initializeXamlEventAttributes(this.$xamlDefaults, this);
                this._initializeXamlEventAttributes(this.$xamlAttributes, this.$rootScope);
            }