Render output from given statistics.

@param  ProjectStatistics $statistics
@return string
559238
public function render(ProjectStatistics $statistics)
    {
        $statsJson = (new JsonBuilder($statistics))->get();

        return $this->output->text($statsJson);
    }
680521
public function render($messages = null)
	{
		if ($messages)
		{
			$this->setMessages($messages);
		}

		$messages = $this->getMessages();

		$output = array();
		$output[] = '<div class="debug-varlist">';
		foreach ($messages as $item)
		{
			$output[] = $this->line($item);
		}
		$output[] = '</div>';
		return implode("\n", $output);
	}
1179700
public function render($outputDestination) {
        self::$_plotColour = 0;

		$groupCount = $this->_chart->getPlotArea()->getPlotGroupCount();

		$dimensions = null;
		if ($groupCount == 1) {
			$chartType = $this->_chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType();
		} else {
			$chartTypes = array();
			for($i = 0; $i < $groupCount; ++$i) {
				$chartTypes[] = $this->_chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();
			}
			$chartTypes = array_unique($chartTypes);
			if (count($chartTypes) == 1) {
				$chartType = array_pop($chartTypes);
			} elseif (count($chartTypes) == 0) {
				echo 'Chart is not yet implemented<br />';
				return false;
			} else {
				return $this->_renderCombinationChart($groupCount,$dimensions,$outputDestination);
			}
		}

		switch ($chartType) {
			case 'area3DChart' :
				$dimensions = '3d';
			case 'areaChart' :
				$this->_renderAreaChart($groupCount,$dimensions);
				break;
			case 'bar3DChart' :
				$dimensions = '3d';
			case 'barChart' :
				$this->_renderBarChart($groupCount,$dimensions);
				break;
			case 'line3DChart' :
				$dimensions = '3d';
			case 'lineChart' :
				$this->_renderLineChart($groupCount,$dimensions);
				break;
			case 'pie3DChart' :
				$dimensions = '3d';
			case 'pieChart' :
				$this->_renderPieChart($groupCount,$dimensions,False,False);
				break;
			case 'doughnut3DChart' :
				$dimensions = '3d';
			case 'doughnutChart' :
				$this->_renderPieChart($groupCount,$dimensions,True,True);
				break;
			case 'scatterChart' :
				$this->_renderScatterChart($groupCount);
				break;
			case 'bubbleChart' :
				$this->_renderBubbleChart($groupCount);
				break;
			case 'radarChart' :
				$this->_renderRadarChart($groupCount);
				break;
			case 'surface3DChart' :
				$dimensions = '3d';
			case 'surfaceChart' :
				$this->_renderContourChart($groupCount,$dimensions);
				break;
			case 'stockChart' :
				$this->_renderStockChart($groupCount,$dimensions);
				break;
			default	:
				echo $chartType.' is not yet implemented<br />';
				return false;
		}
		$this->_renderLegend();

		$this->_graph->Stroke($outputDestination);
		return true;
	}
934525
public function statistics(array $statistics) {
		if ($this->_isCli) {
			return $this->_none('Not allowed in cli');
		}
		if (!$this->settings['chartEnabled']) {
			return $this->_none('Please install <b>imsamurai/cakephp-google-chart</b> plugin to view graph');
		}
		if (empty($statistics)) {
			return $this->_none();
		}
		
		$this->GoogleChart->load();

		$chartData = $this->GoogleChart->dataFromArray(array(
			'memory' => array_map('floatval', Hash::extract($statistics, '{n}.memory')),
			'cpu' => array_map('floatval', Hash::extract($statistics, '{n}.cpu')),
			'date' => array_map('strtotime', Hash::extract($statistics, '{n}.created')),
			'statistics' => $statistics
				), array(
			'date' => array(
				'v' => 'date.{n}',
				'f' => 'statistics.{n}.created'
			),
			'memory' => 'memory.{n}',
			'cpu' => 'cpu.{n}',
			'{"role": "annotation"}' => 'statistics.{n}.status',
				)
		);

		return $this->GoogleChart->draw('LineChart', $chartData, array(
			'height' => 300,
			'width' => 800,
			'pointSize' => 5,
			'vAxis' => array(
				'title' => 'Percentage'
			),
			'hAxis' => array(
				'title' => 'Time'
			),
			'chartArea' => array(
				'left' => 50,
				'top' => 10,
				'height' => 230,
				'width' => 650,
			)
				)
		);
	}
359073
public function renderTree($menuItems, $level = null)
    {
        $output = '';

        $depth = ($level !== null) ? $level : 1;

        foreach ($menuItems as $key => $menuItem) {
            $classes = ['menu-item'];
            $menuItemRow = $this->_View->element('../Menus/__menu-item-row', [
                'menuItem' => $menuItem,
                'level' => $level
            ]);

            if (!empty($menuItem['children'])) {
                $menuItemRow .= '<ul>' . $this->renderTree($menuItem['children'], $depth + 1) . '</ul>';
            } else {
                $classes[] = 'no-children';
            }
            $output .= '<li class="' . join(' ', $classes) . '" data-menu-item-id="' . $menuItem['id'] . '">' . $menuItemRow . '</li>';
        }

        return $output;
    }
893819
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext): string {
    $input     = $arguments['input'];
    $separator = $arguments['separator'];
    $output    = '';

    if ($input) {
      $output = self::createSlug($input, $separator);
    }

    return $output;
  }
300864
private function getTablesSummary($statuses)
    {
        $dataTable = new DataTable();
        foreach ($statuses as $status) {
            $dataTable->addRowFromSimpleArray(array(
                                                   'label'      => $status['Name'],
                                                   'data_size'  => $status['Data_length'],
                                                   'index_size' => $status['Index_length'],
                                                   'row_count'  => $status['Rows']
                                              ));
        }
        return $dataTable;
    }
538144
public function render(ResultsRenderer $renderer)
    {
        return sprintf(
            "  %s\n%s\n\n  %s\n%s\n",
            $renderer->style('YOUR OUTPUT:', ['bold', 'yellow']),
            $this->indent($renderer->style(sprintf('"%s"', $this->result->getActualValue()), 'red')),
            $renderer->style('EXPECTED OUTPUT:', ['bold', 'yellow']),
            $this->indent($renderer->style(sprintf('"%s"', $this->result->getExpectedValue()), 'green'))
        );
    }
67781
public function statsAction()
    {
        $om = $this->getObjectManager();
        $repository = $om->getRepository('TamagoTipsManagerBundle:TamagoTransUnitMeta');
        $stats = $repository->stats();

        return $this->render('TamagoTipsManagerBundle:Default:stats.html.twig', ['stats' => $stats]);
    }
1115997
public function renderSections($sections = null)
    {
        if ($sections === null) {
            $sections = $this->getSections();
        }
        $res = '';
        foreach ($sections as $section) {
            $res .= $this->renderSection($section);
        }

        return $res;
    }
349475
public function render(array $parameters = []): string
    {
        /** @var Location $location */
        $location = $parameters['location'];
        /** @var Content $content */
        $content = $parameters['content'];
        /** @var Language $language */
        $language = $parameters['language'];
        $versionNo = $content->getVersionInfo()->versionNo;

        // nonpublished content should use parent location instead because location doesn't exist yet
        if (!$content->contentInfo->published && null === $content->contentInfo->mainLocationId) {
            $parentLocations = $this->locationService->loadParentLocationsForDraftContent($content->getVersionInfo());
            $location = reset($parentLocations);
            $versionNo = null;
        }

        $siteaccesses = $this->siteaccessResolver->getSiteaccessesForLocation(
            $location,
            $versionNo,
            $language->languageCode
        );

        if (empty($siteaccesses)) {
            return $this->twig->render(
                '@ezdesign/content/content_edit/component/preview_unavailable.html.twig'
            );
        }

        return '';
    }
846908
private function _exportResourceStats(CMp $mp, array $stats) {
		$result = array();

		$mpftMap = $this->getMpftMap($mp->ItemPartBF);

		$statIndex = 0;
		foreach ($mpftMap as $bit => $name) {
			$statValues = $stats[$statIndex];

			// get stat keys that this mpft is using
			$statKeys = $this->getMpftStats($bit);
			$result[$name] = array();
			foreach ($statKeys as $key) {
				$index = $this->getStatIndex($key);
				$result[$name][$key] = $statValues->Stats[$index];
			}
			$statIndex++;
		}

		return $result;
	}
319651
final function Render()
    {
        $this->output = '';
        $this->ReadTranslations();
        if ($this->BeforeInit())
        {
            return $this->output;
        }
        if ($this->Init())
        {
            return $this->output;
        }
        if ($this->BeforeGather())
        {
            return $this->output;
        }
        $this->GatherOutput();
        $this->AfterGather();
        return $this->output;        
    }
1149837
protected function renderRequestInfo()
    {
        $output = '';
        if ($this->requestInformationRenderer !== null) {
            $output = $this->requestInformationRenderer->__invoke();
        }

        return $output;
    }
1079280
protected function renderXmlOutput()
    {
        $message = $this->translator()->translate('Method not allowed. Must be one of: {{ methods }}', [
            '{{ methods }}' => $this->getMethods()
        ], 'charcoal');

        return $this->renderTemplate('<root><message>'.$message.'</message></root>');
    }
933088
public function getFrameworkStatisticsActivity():Renderer
    {

        $appmaster = $this->getMaster('Apps');
        $appstats = $appmaster->getStatisticsApp();

        // ROUTING STATS IS TOO LONG - CHECK IT TO OPTIMIZE
        $routiningmaster = $this->getMaster('Routing');
        $routingstats = $routiningmaster->getStatisticsRouting();
        
        $dbmaster = $this->getMaster('Databases');
        $dbstats = $dbmaster->getStatisticsDatabases();


        $logsmaster = $this->getMaster('Logs');
        $logsstats = $logsmaster->getStatisticsLogs();

        $servicemaster = $this->getMaster('Services');
        $servicestats = $servicemaster->getStatisticsServices();



        return ((new Renderer())->jsonRenderer(array("code" => 200, "results" => array("apps" => $appstats,
            "routes" => $routingstats, "dbs" => $dbstats, "logs" => $logsstats, "services" => $servicestats))));
    }
604571
protected function getSummaryHtml($projects)
    {
        $summaryBuilds = array();
        $successes     = array();
        $failures      = array();
        $counts        = array();

        foreach ($projects as $project) {
            $summaryBuilds[$project->getId()] = $this->buildStore->getLatestBuilds($project->getId());

            $count = $this->buildStore->getWhere(
                array('project_id' => $project->getId()),
                1,
                0,
                array(),
                array('id' => 'DESC')
            );
            $counts[$project->getId()] = $count['count'];

            $success = $this->buildStore->getLastBuildByStatus($project->getId(), Build::STATUS_SUCCESS);
            $failure = $this->buildStore->getLastBuildByStatus($project->getId(), Build::STATUS_FAILED);

            $successes[$project->getId()] = $success;
            $failures[$project->getId()] = $failure;
        }

        $summaryView = new b8\View('SummaryTable');
        $summaryView->projects   = $projects;
        $summaryView->builds     = $summaryBuilds;
        $summaryView->successful = $successes;
        $summaryView->failed     = $failures;
        $summaryView->counts     = $counts;

        return $summaryView->render();
    }