render.

@param string $content
@param string $method
@param array $appendTo
@return string
324929
protected function render($content, $method, $appendTags = ['body'])
    {
        $appendHtml = $this->renderBuffer(function () use ($method) {
            $requestUri = Arr::get($_SERVER, 'REQUEST_URI');
            Arr::set($_SERVER, 'REQUEST_URI', '');
            call_user_func([$this->bar, $method]);
            Arr::set($_SERVER, 'REQUEST_URI', $requestUri);
        });

        $appendTags = array_unique($appendTags);

        foreach ($appendTags as $appendTag) {
            $pos = strripos($content, '</'.$appendTag.'>');

            if ($pos !== false) {
                return substr_replace($content, $appendHtml, $pos, 0);
            }
        }

        return $content.$appendHtml;
    }
783397
public function render( $widget, $content = '', $params = array() )
    {
        $view    = $this->getView();
        $content = (string) $content;

        if ( empty( $view ) || empty( $widget ) ||
             ! array_key_exists( $widget, $this->widgets ) )
        {
            return $content;
        }

        if ( $params instanceof \Traversable )
        {
            $params = iterator_to_array( $params );
        }
        else if ( ! is_array( $params ) )
        {
            $params = (array) $params;
        }

        $serviceLocator = $this->getServiceLocator();

        foreach ( $this->widgets[$widget] as $service )
        {
            if ( is_scalar( $service ) )
            {
                $service = $serviceLocator->get( $service );
            }

            if ( $service instanceof ServiceLocatorAwareInterface )
            {
                $service->setServiceLocator( $serviceLocator );
            }

            $content = $service->render( $view, $content, $params );
        }

        return $content;
    }
327980
public function renderContentBegin() {
		
		echo CHtml::openTag('div', $this->contentHtmlOptions);
		if (!empty($this->content)) {
			echo $this->content;
		}
	}
336060
public function render()
    {
        if (in_array($this->type, $this->types)) {
            $method = $this->type.'ToHtml';

            return $this->$method();
        }

        return '';
    }
888256
public void appendTo(
      Appendable out,
      DependencyInfo info,
      CharSource content) throws IOException {
    if (info.isModule()) {
      mode.appendGoogModule(transpile(content.read()), out, sourceUrl);
    } else if ("es6".equals(info.getLoadFlags().get("module")) && transpiler == Transpiler.NULL) {
      // TODO(johnplaisted): Make the default transpiler the ES_MODULE_TO_CJS_TRANSPILER. Currently
      // some code is passing in unicode identifiers in non-ES6 modules the compiler fails to parse.
      // Once this compiler bug is fixed we can always transpile.
      mode.appendTraditional(transpileEs6Module(content.read()), out, sourceUrl);
    } else {
      mode.appendTraditional(transpile(content.read()), out, sourceUrl);
    }
  }
629218
protected function _renderTag($attribs = array(), $content = null, TemplateInterface $template)
    {
        $result = '';
        $link   = isset($attribs['src']) ? $attribs['src'] : false;

        if($link)
        {
            $url        = $this->getObject('lib:http.url', array('url' => $link));
            $identifier = $this->getIdentifier($url->toString(HttpUrl::BASE));

            //Include the component
            $result = $this->getObject('com:'.$identifier->package.'.dispatcher.fragment')
                ->include($url);

            if($this->getObject('template.engine.factory')->isDebug())
            {
                $format  = PHP_EOL.'<!--BEGIN ktml:include '.$url.' -->'.PHP_EOL;
                $format .= '%s';
                $format .= PHP_EOL.'<!--END ktml:include '.$url.' -->'.PHP_EOL;

                $result = sprintf($format, trim($result));
            }
        }

        return $result;
    }
942929
public static function postProcessing(Compiler $compiler, array $params, $prepend, $append, $content)
    {
        return $content . Compiler::PHP_OPEN . ' /* end template body */' . "\n" . 'return $this->buffer . ob_get_clean();';
    }
598406
public function render($content)
    {
        $element = $this->getElement();
        $view    = $element->getView();
        if (null === $view) {
            return $content;
        }

        $tooltip = $element->getAttrib('tooltip');
        $tooltip = trim($tooltip);
        //$element->removeAttrib('tooltip');

        if (empty($tooltip)) {
            return $content;
        }

        $view->headScript()->appendFile(\Zend_Controller_Front::getInstance()->getBaseUrl()  .  '/gems/js/jquery.cluetip.js');
        $view->headLink()->appendStylesheet(\Zend_Controller_Front::getInstance()->getBaseUrl()  . '/gems/js/jquery.cluetip.css');
        $script = "$('" . $this->getTag() . ".tooltip').cluetip({
            activation: 'click',
            sticky: 'true',
            closeText: '[X]',
            closePosition:    'title',
            width: 450,
            titleAttribute: 'tip',
            splitTitle: '|'})
                   $('#tabContainer').bind( 'tabsselect', function(event, ui) {
  $(document).trigger('hideCluetip');
});";

        $view->jQuery()->addOnLoad($script);

        $separator = $this->getSeparator();
        $placement = $this->getPlacement();
        $class     = $this->getClass();
        $tag       = $this->getTag();
        $escape    = $this->getEscape();

        $options   = $this->getOptions();

        if ($escape) {
            $tooltip = $view->escape($tooltip);
        }

        $options['tag'] = $tag;
        $options['tip'] = str_replace('"', '\"', $tooltip);
        $decorator = new \Zend_Form_Decorator_HtmlTag($options);
        $tooltip = $decorator->render($this->getImg()) . $decorator->setOptions(array('class'=>'thetooltip', 'id'=>'tooltip-' . $this->getElement()->getAttrib('id')))->render($tooltip);

        switch ($placement) {
            case self::PREPEND:
                return $tooltip . $separator . $content;
            case self::APPEND:
            default:
                return $content . $separator . $tooltip;
        }

        /* Misschien later toch toevoegen */
        $helper = $this->getHelper();

        return $view->$helper($id, $content, $attribs);
    }
556401
public function appendToFile($filename, $content)
    {
        if (\is_array($content)) {
            @trigger_error(sprintf('Calling "%s()" with an array in the $content argument is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);
        }

        $dir = \dirname($filename);

        if (!is_dir($dir)) {
            $this->mkdir($dir);
        }

        if (!is_writable($dir)) {
            throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
        }

        if (false === @file_put_contents($filename, $content, FILE_APPEND)) {
            throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
        }
    }
715608
public function appendToFile($file, $content)
    {
        if (! file_exists($file)) {
            throw new \Exception('File is missing');
        }
        file_put_contents($file, $content, FILE_APPEND);
    }
1293765
function ($appendTo, data) {
      var that = this;
      var opts = this.options;
      var level = 0;
      if (data.level) {
        level = data.level;
      } else {
        level = data.level = $appendTo.parentsUntil('.orgchart', '.nodes').length + 1;
      }
      // Construct the node
      var childrenData = data.children;
      var hasChildren = childrenData ? childrenData.length : false;
      var $nodeWrapper;
      if (Object.keys(data).length > 2) {
        var $nodeDiv = this.createNode(data);
        if (opts.verticalLevel && level >= opts.verticalLevel) {
          $appendTo.append($nodeDiv);
        }else {
          $nodeWrapper = $('<table>');
          $appendTo.append($nodeWrapper.append($('<tr/>').append($('<td' + (hasChildren ? ' colspan="' + childrenData.length * 2 + '"' : '') + '></td>').append($nodeDiv))));
        }
      }
      // Construct the lower level(two "connectiong lines" rows and "inferior nodes" row)
      if (hasChildren) {
        var isHidden = (level + 1 > opts.visibleLevel || data.collapsed) ? ' hidden' : '';
        var isVerticalLayer = (opts.verticalLevel && (level + 1) >= opts.verticalLevel) ? true : false;
        var $nodesLayer;
        if (isVerticalLayer) {
          $nodesLayer = $('<ul>');
          if (isHidden && level + 1 > opts.verticalLevel) {
            $nodesLayer.addClass(isHidden);
          }
          if (level + 1 === opts.verticalLevel) {
            $appendTo.children('table').append('<tr class="verticalNodes' + isHidden + '"><td></td></tr>')
              .find('.verticalNodes').children().append($nodesLayer);
          } else {
            $appendTo.append($nodesLayer);
          }
        } else {
          var $upperLines = $('<tr class="lines' + isHidden + '"><td colspan="' + childrenData.length * 2 + '"><div class="downLine"></div></td></tr>');
          var lowerLines = '<tr class="lines' + isHidden + '"><td class="rightLine"></td>';
          for (var i=1; i<childrenData.length; i++) {
            lowerLines += '<td class="leftLine topLine"></td><td class="rightLine topLine"></td>';
          }
          lowerLines += '<td class="leftLine"></td></tr>';
          $nodesLayer = $('<tr class="nodes' + isHidden + '">');
          if (Object.keys(data).length === 2) {
            $appendTo.append($upperLines).append(lowerLines).append($nodesLayer);
          } else {
            $nodeWrapper.append($upperLines).append(lowerLines).append($nodesLayer);
          }
        }
        // recurse through children nodes
        $.each(childrenData, function () {
          var $nodeCell = isVerticalLayer ? $('<li>') : $('<td colspan="2">');
          $nodesLayer.append($nodeCell);
          this.level = level + 1;
          that.buildHierarchy($nodeCell, this);
        });
      }
    }
176448
private static function appendIfPresent($src, $key, $dest)
    {
        if (!empty($src[$key])) {
            return array_merge($dest, $src[$key]);
        } else {
            return $dest;
        }
    }
258167
protected void renderContent(AbstractRenderAppender writer, TreeElement node)
    {
        String ctnt = node.getContent();
        if (ctnt != null) {
            renderContentPrefix(writer, node);
            if (_trs.escapeContent) {
                HtmlUtils.filter(ctnt, writer);
            }
            else {
                writer.append(ctnt);
            }
            renderContentSuffix(writer, node);
        }
    }
1312409
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            $link      = isset($attribs['src']) ? $attribs['src'] : false;
            $condition = isset($attribs['condition']) ? $attribs['condition'] : false;

            if(!$link)
            {
                $script = trim($content);
                $hash   = md5($script.serialize($attribs));

                if (!isset($this->_loaded[$hash]))
                {
                    JFactory::getDocument()->addScriptDeclaration($script);
                    $this->_loaded[$hash] = true;
                }
            }
            else
            {
                if($condition)
                {
                    $script = parent::_renderTag($attribs, $content);
                    JFactory::getDocument()->addCustomTag($script);
                }
                else
                {
                    unset($attribs['src']);
                    unset($attribs['condition']);

                    JFactory::getDocument()->addScript($link, 'text/javascript');
                }
            }
        }
        else return parent::_renderTag($attribs, $content);
    }
853584
private function renderHtml(&$content, $html, $encoding, $boundary)
    {
        $content .= "\r\n";
        $content .= "--$boundary\r\n";
        $content .= "Content-Type: text/html;\r\n\tcharset=\"$encoding\"\r\n";
        $content .= "Content-Transfer-Encoding: quoted-printable\r\n";
        $content .= "\r\n";
        $content .= "$html\r\n";
    }
513588
public function append($method, $request)
    {
        preg_match('%/_api/simple/(?P<simple>\w*)|/_api/(?P<direct>\w*)%ix', $request, $regs);

        if (!isset($regs['direct'])) {
            $regs['direct'] = '';
        }
        $type = $regs['direct'] !== '' ? $regs['direct'] : $regs['simple'];

        if ($method === 'GET' && $type === $regs['direct']) {
            $type = 'get' . $type;
        }

        if (null === $this->_nextBatchPartId) {
            if (is_a($this->_batchParts, \SplFixedArray::class)) {
                $nextNumeric = $this->_nextId;
                $this->_nextId++;
            } else {
                $nextNumeric = count($this->_batchParts);
            }
            $batchPartId = $nextNumeric;
        } else {
            $batchPartId            = $this->_nextBatchPartId;
            $this->_nextBatchPartId = null;
        }

        $eol = HttpHelper::EOL;

        $result = 'HTTP/1.1 202 Accepted' . $eol;
        $result .= 'location: /_db/_system/_api/document/0/0' . $eol;
        $result .= 'content-type: application/json; charset=utf-8' . $eol;
        $result .= 'etag: "0"' . $eol;
        $result .= 'connection: Close' . $eol . $eol;
        $result .= '{"error":false,"_id":"0/0","id":"0","_rev":0,"hasMore":1, "result":[{}], "documents":[{}]}' . $eol . $eol;

        $response  = new HttpResponse($result);
        $batchPart = new BatchPart($this, $batchPartId, $type, $request, $response, [
            'cursorOptions'  => $this->_batchPartCursorOptions,
            '_documentClass' => $this->_documentClass,
        ]);

        $this->_batchParts[$batchPartId] = $batchPart;

        $response->setBatchPart($batchPart);

        return $response;
    }
638921
public function appendContent($content)
    {
        if (!empty($content)) {
            if (is_array($this->content)) {
                $this->content[] = $content;
            } else {
                $this->content .= $content;
            }
        }
        return $this;
    }