Renders after a step.

@param object : BehatHTMLFormatter object

@return string : HTML generated
978496
public function renderAfterStep($obj)
    {
        $print = array();
        foreach ($this->rendererList as $name => $renderer) {
            $print[$name] = $renderer->renderAfterStep($obj);
        }

        return $print;
    }
1270303
function renderString(templateString, options, callback) {
  var template = builtTemplateFromString(templateString, '', options);
  return template.render({ model: options, }, callback);
}
1039769
function render(list) {
	const blank = new Array(process.stdout.rows).fill('\n')
	console.log(blank)
	readline.cursorTo(process.stdout, 0, 0)
	readline.clearScreenDown(process.stdout)
	list.forEach( user => {
		console.log(`${chalk.hsl(color(user.name),100,50)(user.name)}: ${user.id}`)
	})


}
140160
public function render_stepsdefinitions($stepsdefinitions, $form) {
        global $CFG;
        require_once($CFG->libdir . '/behat/classes/behat_selectors.php');

        $html = $this->generic_info();

        // Form.
        ob_start();
        $form->display();
        $html .= ob_get_contents();
        ob_end_clean();

        if (empty($stepsdefinitions)) {
            $stepsdefinitions = get_string('nostepsdefinitions', 'tool_behat');
        } else {

            $stepsdefinitions = implode('', $stepsdefinitions);

            // Replace text selector type arguments with a user-friendly select.
            $stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\d?_STRING)/',
                function ($matches) {
                    return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
                },
                $stepsdefinitions
            );

            // Replace selector type arguments with a user-friendly select.
            $stepsdefinitions = preg_replace_callback('/(SELECTOR\d?_STRING)/',
                function ($matches) {
                    return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
                },
                $stepsdefinitions
            );

            // Replace simple OR options.
            $regex = '#\(\?P<[^>]+>([^\)|]+\|[^\)]+)\)#';
            $stepsdefinitions = preg_replace_callback($regex,
                function($matches){
                    return html_writer::select(explode('|', $matches[1]), uniqid());
                },
                $stepsdefinitions
            );

            $stepsdefinitions = preg_replace_callback('/(FIELD_VALUE_STRING)/',
                function ($matches) {
                    global $CFG;

                    // Creating a link to a popup with the help.
                    $url = new moodle_url(
                        '/help.php',
                        array(
                            'component' => 'tool_behat',
                            'identifier' => 'fieldvalueargument',
                            'lang' => current_language()
                        )
                    );

                    // Note: this title is displayed only if JS is disabled,
                    // otherwise the link will have the new ajax tooltip.
                    $title = get_string('fieldvalueargument', 'tool_behat');
                    $title = get_string('helpprefix2', '', trim($title, ". \t"));

                    $attributes = array('href' => $url, 'title' => $title,
                        'aria-haspopup' => 'true', 'target' => '_blank');

                    $output = html_writer::tag('a', 'FIELD_VALUE_STRING', $attributes);
                    return html_writer::tag('span', $output, array('class' => 'helptooltip'));
                },
                $stepsdefinitions
            );
        }

        // Steps definitions.
        $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));

        $html .= $this->output->footer();

        return $html;
    }
1237368
function render()
    {
        if (!isset($this->result)) {
            $this->usageError('Nothing to render!');
        }

        $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';

        if (!empty($_SERVER['argv'])) {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';
        } else {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';
        }

        $this->renderViewFile($viewFilename, $this->result);
    }
410114
function render () {
  todosContainer.innerHTML = '<ul>' +
    todos.map(function (todo, index) {
      return '<li class="item">' +
        todo +
        ' <button class="remove-todo" data-index="' + index + '">X</button>' +
      '</li>'
    }).join('') +
  '</ul>'
}
371603
function(current) {
                    if (typeof current.steps === 'object' && typeof current.steps.map === 'function' && current.steps.length > 0) {
                      return current.steps;
                    }
                    var steps = null;
                    if (typeof current.render === 'function') {
                      try {
                        steps = findScreenerStepsInRender(current.render(function(fn) {
                          return fn;
                        }));
                      } catch (ex) {
                        steps = null;
                      }
                    }
                    if (typeof current.components === 'object' && typeof current.components.story === 'object' && typeof current.components.story.render === 'function') {
                      try {
                        steps = findScreenerStepsInRender(current.components.story.render(function(fn) {
                          return fn;
                        }, {}));
                      } catch (ex) {
                        steps = null;
                      }
                    }
                    return steps;
                  }
544938
function renderObjectImmediate( object, program ) {

		object.render( function ( object ) {

			_this.renderBufferImmediate( object, program );

		} );

	}
1132994
function renderStream() {
    es.addEventListener('css:processed', function (event) {
      // Inject the CSS
      var style = document.getElementById('jsbin-css');
      if (style.styleSheet) {
        style.styleSheet.cssText = event.data;
      } else {
        style.innerHTML = event.data;
      }
    });

    es.addEventListener('reload', reload);
    // Update the url when the revision is bumped
    es.addEventListener('bump-revision', function (event) {
      window.location.pathname = cleanPath(event.data);
    });
    // Javascript and HTML cause a reload. Would be nice to make it possible to
    // inject HTML changes in future.
    es.addEventListener('javascript:processed', reload);
    es.addEventListener('html:processed', reload);
  }
325393
function renderTypeFun(obj) {
    if (!this.isGridShow()) return;
    if (typeof obj == 'undefined') {
        var begin = null,
            length = null,
            field = '';
    } else {
        var begin = typeof obj.begin == 'undefined' ? null : obj.begin,
            length = typeof obj.length == 'undefined' ? null : obj.length,
            field = typeof obj.field == 'undefined' ? '' : obj.field;
    }
    var oThis = this,
        begin = parseInt(begin),
        length = parseInt(length),
        end = begin;
    if (length > 0) {
        end = parseInt(begin + length - 1);
    }
    if (field == '') {
        if (this.gridCompColumnFixedArr) $.each(this.gridCompColumnFixedArr, function (i) {
            oThis.renderTypeByColumn(this, i, begin, length, true);
        });
        $.each(this.gridCompColumnArr, function (i) {
            oThis.renderTypeByColumn(this, i, begin, length, false);
        });
    } else {
        var rendered = false;
        if (this.gridCompColumnFixedArr) $.each(this.gridCompColumnFixedArr, function (i) {
            if (this.options.field == field) {
                oThis.renderTypeByColumn(this, i, begin, length, true);
                rendered = true;
                return;
            }
        });
        if (!rendered) $.each(this.gridCompColumnArr, function (i) {
            if (this.options.field == field) {
                oThis.renderTypeByColumn(this, i, begin, length, false);
                return;
            }
        });
    }
}
383519
function render() {
      var checked = rgCtrl.getViewValue() == attr.value;

      if (checked === lastChecked) return;

      if (element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {
        // If the radioButton is inside a div, then add class so highlighting will work
        element.parent().toggleClass(CHECKED_CSS, checked);
      }

      if (checked) {
        rgCtrl.setActiveDescendant(element.attr('id'));
      }

      lastChecked = checked;

      element
        .attr('aria-checked', checked)
        .toggleClass(CHECKED_CSS, checked);
    }
534036
public function renderAfterExercise($obj)
    {
        //--> features results
        $featTotal = 0;
        $sceTotal = 0;
        $stepsTotal = 0;

        $strFeatPassed = '';

        if (null !== $obj->getPassedFeatures() && count($obj->getPassedFeatures()) > 0) {
            $strFeatPassed = ' <strong class="passed">'.count($obj->getPassedFeatures()).' success</strong>';
            $featTotal += count($obj->getPassedFeatures());
        }

        $strFeatFailed = '';
        $sumRes = 'passed';
        if (null !== $obj->getFailedFeatures() && count($obj->getFailedFeatures()) > 0) {
            $strFeatFailed = ' <strong class="failed">'.count($obj->getFailedFeatures()).' fail</strong>';
            $sumRes = 'failed';
            $featTotal += count($obj->getFailedFeatures());
        }

        //--> scenarios results
        $strScePassed = '';
        if (null !== $obj->getPassedScenarios() && count($obj->getPassedScenarios()) > 0) {
            $strScePassed = ' <strong class="passed">'.count($obj->getPassedScenarios()).' success</strong>';
            $sceTotal += count($obj->getPassedScenarios());
        }

        $strScePending = '';
        if (null !== $obj->getPendingScenarios() && count($obj->getPendingScenarios()) > 0) {
            $strScePending = ' <strong class="failed">'.count($obj->getPendingScenarios()).' fail</strong>';
            $sceTotal += count($obj->getPendingScenarios());
        }

        $strSceFailed = '';
        if (null !== $obj->getFailedScenarios() && count($obj->getFailedScenarios()) > 0) {
            $strSceFailed = ' <strong class="failed">'.count($obj->getFailedScenarios()).' fail</strong>';
            $sceTotal += count($obj->getFailedScenarios());
        }

        //--> steps results
        $strStepsPassed = '';
        if (null !== $obj->getPassedSteps() && count($obj->getPassedSteps()) > 0) {
            $strStepsPassed = ' <strong class="passed">'.count($obj->getPassedSteps()).' success</strong>';
            $stepsTotal += count($obj->getPassedSteps());
        }

        $strStepsPending = '';
        if (null !== $obj->getPendingSteps() && count($obj->getPendingSteps()) > 0) {
            $strStepsPending = ' <strong class="pending">'.count($obj->getPendingSteps()).' pending</strong>';
            $stepsTotal += count($obj->getPendingSteps());
        }

        $strStepsSkipped = '';
        if (null !== $obj->getSkippedSteps() && count($obj->getSkippedSteps()) > 0) {
            $strStepsSkipped = ' <strong class="skipped">'.count($obj->getSkippedSteps()).' skipped</strong>';
            $stepsTotal += count($obj->getSkippedSteps());
        }

        $strStepsFailed = '';
        if (null !== $obj->getFailedSteps() && count($obj->getFailedSteps()) > 0) {
            $strStepsFailed = ' <strong class="failed">'.count($obj->getFailedSteps()).' fail</strong>';
            $stepsTotal += count($obj->getFailedSteps());
        }

        //list of pending steps to display
        $strPendingList = '';
        if (null !== $obj->getPendingSteps() && count($obj->getPendingSteps()) > 0) {
            foreach ($obj->getPendingSteps() as $pendingStep) {
                $strPendingList .= '
                    <li>'.$pendingStep->getKeyword().' '.$pendingStep->getText().'</li>';
            }
            $strPendingList = '
            <div class="pending">Pending steps :
                <ul>'.$strPendingList.'
                </ul>
            </div>';
        }

        $print = '
        <div class="summary '.$sumRes.'">
            <div class="counters">
                <p class="features">
                    '.$featTotal.' features ('.$strFeatPassed.$strFeatFailed.' )
                </p>
                <p class="scenarios">
                    '.$sceTotal.' scenarios ('.$strScePassed.$strScePending.$strSceFailed.' )
                </p>
                <p class="steps">
                    '.$stepsTotal.' steps ('.$strStepsPassed.$strStepsPending.$strStepsSkipped.$strStepsFailed.' )
                </p>
                <p class="time">
                '.$obj->getTimer().' - '.$obj->getMemory().'
                </p>
            </div>
            <div class="switchers">
                <a href="javascript:void(0)" id="behat_show_all">[+] all</a>
                <a href="javascript:void(0)" id="behat_hide_all">[-] all</a>
            </div>
        </div> '.$strPendingList.'
    </div>'.$this->getJS().'
</body>
</html>';

        return $print;
    }
694123
public function render() : string 
  {
    $sOutput = preg_replace_callback(
      '/{(.*?)}/',
      function ($aResult){
        $aToSearch = explode('.', $aResult[1]);
        $aSearchIn = $this->getData();

        foreach ($aToSearch as $sKey) {
          list(
            $sFormattedKey, 
            $mParam
          )       = self::getFunctionNameAndParameter($sKey);
          $mValue = $aSearchIn[$sFormattedKey];

          if(is_string($mValue)) {

            return $mValue;
          } else if(is_object($mValue)) {
            if($mParam){

              return $mValue($mParam);
            }

            return $mValue();
          }
          
          $aSearchIn = $mValue;
        }

        return (
          $this->hasShowEmpty() 
          ? 
          $aResult[0] 
          : 
          ''
        );
      },
      $this->getTemplate()
    );
    
    return preg_replace('/^\s+|\n|\r|\t/m', '', $sOutput);
  }
1038704
function renderCustomTemplate(body, template, callback) {
  if(typeof callback !== 'function') {
    callback = function(){};
  }

  if(typeof template === 'function') {
    template(body, callback);
  }

  // if(typeof template === 'string') {

  // }
}
282844
function(el, template, context, opts) {
      opts = opts || {};
      if (_.isString(template)) {
        opts.newHTML = template;
      }
      templateRenderer.render(el, template, context, opts);
    }
1290235
function render_template(type, object) {
  try {
    return new EJS({text: __templates[type]}).render(object);
  } catch (e) {
    //console.error(e);
    return "";
  }
}
707153
function finishRendering(data){
			// If none object found with given id return error
			if(id && !data[0])
				return next();

			// If querying for id, then returns only the object
			if(id)
				data = data[0];

			// Render the json
			res.send(data);
		}