レンダリングを行います。

@return	string	レンダリング結果
556654
public function twigRender ($template_file = null, $render = null, $template_dir_list = [], $options = []) {
		$this->renderSetting();
		$template = $this->twigLoadFileTemplate($template_file, $template_dir_list, $options);
		$render = $this->adjustRender($render);
		return $template->render($render);
	}
1310715
public function adminRender()
    {
        $result = '';
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $ctrl = new Menus_Controller_Admin($this, $page);
        switch (true)
        {
            case !is_null(arg('id')):
                $result = $ctrl->editAction();
                break;
            case arg('action') == 'create':
                $result = $ctrl->addAction();
                break;
            case !is_null(arg('toggle')):
                $ctrl->toggleAction(arg('toggle', 'int'));
                break;
            case !is_null(arg('delete')):
                $ctrl->deleteAction(arg('delete', 'dbsafe'));
                break;
            default:
                $result = $ctrl->listAction();
        }
        return $result;
    }
611106
public function render(): string
    {
        $string = str_repeat('#', intval($this->attributes['header'])) . ' ';
        if ($this->hasChildren() === true) {

            foreach ($this->children() as $child) {
                $string .= $child->render();
            }
        }
        $string .= "{$this->escape($this->insert)}";

        return $string;



        /*return str_repeat('#', intval($this->attributes['header'])) .
            " {$this->escape($this->insert)}";*/
    }
259744
public function getRenderedLine()
    {
        if (isset($this->_detectMatch[1]) && ($nbr = substr($this->_detectMatch[1], 1)) && is_numeric($nbr))
            $this->_nbrParagraphs = $nbr;
        $result = '';
        for ($i = 0; $i < $this->_nbrParagraphs; $i++)
            $result .= $this->_getParagraph($i == 0);
        return ($result);
    }
256470
public function index()
    {
        $this->defaultData();
        $rolesc = new \core_kernel_classes_Class(GenerisRdf::CLASS_ROLE);
        $roles = array();
        foreach ($rolesc->getInstances(true) as $id => $r) {
            $roles[] = array('id' => $id, 'label' => $r->getLabel());
        }
        usort($roles, function($a, $b) {
        	return strcmp($a['label'],$b['label']);
        });

        $this->setData('roles', $roles);
        $this->setView('list.tpl');
    }
283635
public function getIterator()
    {
        $header = $this->getHeader();

        while ($data = $this->getNextDataSet()) {
            $headerColumns = count($header);
            $dataColumns   = count($data);

            if ($headerColumns > $dataColumns && $this->appendRowsColumns) {
                $data = array_pad($data, $headerColumns, '');
                $this->malformedStatistic['appended']++;
            } elseif ($headerColumns < $dataColumns && $this->truncateRowsColumns) {
                $data = array_slice($data, 0, $headerColumns);
                $this->malformedStatistic['truncated']++;
            } elseif ($headerColumns != $dataColumns) {
                if ($this->ignoreMalformed) {
                    $this->malformedStatistic['malformed']++;
                    continue;
                }
                throw new Exception("Count mismatch in line {$this->getLineNumber()}, expected: {$headerColumns}, got: {$dataColumns}");
            }

            $set = array_combine($header, $data);
            yield $set;
        }
    }
228897
protected function getDisplayValue() : string
    {
        try {
            $displayField = $this->table->getDisplayField();
            $displayValue = $this->entity->get($displayField);

            $factory = new FieldHandlerFactory();
            $result = $factory->renderValue($this->table, $displayField, $displayValue, [ 'renderAs' => 'plain']);
        } catch (InvalidArgumentException $e) {
            $result = 'reminder';
        }

        return $result;
    }
817389
protected function toString()
    {
        if ($this->rendered !== null) {
            return $this->rendered;
        }

        if (is_callable($this->callback)) {
            try {
                return $this->rendered = $this->invokeCallable($this->callback, $this->callbackArguments);
            } catch (\Exception $e) {
                trigger_error($e->getMessage(), E_USER_NOTICE);
            }
        }

        return $this->content ?: '';
    }
1241122
public function render()
    {
        $nameAttribute = $this->getName();
        $this->registerFieldNameForFormTokenGeneration($nameAttribute);

        $output = '';
        $resource = $this->getUploadedResource();
        if ($resource !== null) {
            $resourceIdentityAttribute = '';
            if ($this->hasArgument('id')) {
                $resourceIdentityAttribute = ' id="' . htmlspecialchars($this->arguments['id']) . '-resource-identity"';
            }
            $output .= '<input type="hidden" name="'. htmlspecialchars($nameAttribute) . '[originallySubmittedResource][__identity]" value="' . $this->persistenceManager->getIdentifierByObject($resource) . '"' . $resourceIdentityAttribute . ' />';
        }

        if ($this->hasArgument('collection') && $this->arguments['collection'] !== false && $this->arguments['collection'] !== '') {
            $output .= '<input type="hidden" name="'. htmlspecialchars($nameAttribute) . '[__collectionName]" value="' . htmlspecialchars($this->arguments['collection']) . '" />';
        }

        $this->tag->addAttribute('type', 'file');
        $this->tag->addAttribute('name', $nameAttribute);

        $this->addAdditionalIdentityPropertiesIfNeeded();
        $this->setErrorClassAttribute();

        $output .= $this->tag->render();
        return $output;
    }
996234
protected function showTime()
    {
        $runtime = $this->swoole->runtime();
        // 显示运行时间
        $showTime = '执行时间: ' . $runtime['time'];
        // 显示内存占用
        $showTime .= ' | 内存占用:' . $runtime['memory'];
        return $showTime;
    }
796306
public function getRtfCode()
    {
        $content = '{\fftype2\ffres25\fftypetxt0\ffhaslistbox\ffdefres0';
        foreach ($this->_items as $text) {
            $text = PHPRtfLite_Utf8::getUnicodeEntities($text, $this->_rtf->getCharset());
            $content .= '{\*\ffl ' . $text . '}';
        }
        $content .= '}';
        return $content;
    }
155961
public function getIndex()
    {
        $this->di->get("auth")->isAdmin(true);

        $user = new User();
        $user->setDb($this->di->get("db"));

        $title      = "Min sida";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");


        $data = [
            "title" => $title,
            "users" => $user->findAll(),
        ];

        $view->add("admin/index", $data);

        $pageRender->renderPage(["title" => $title]);
    }
673924
public function getRawUri() {
        $query = $this->server->get('QUERY_STRING');

        if (!empty($query)) {
            $query = '?' . urldecode($query);
        }

        return $this->getSchemeAndHttpHost() . $this->getBaseUrl() . $this->getPathInfo() . $query;
    }
782383
private function renderData()
    {

        if (count($this->datalist) == 0) {
            return ""; //"<tr  ><td  align=\"center\" colspan=\"" . count($this->columns) . "\" >" . MSG_DATATABLE_NODATA . "</td></tr>";
        }
        $rownumber = 0;
        $rows = "";
        foreach ($this->datalist as $item) {     //цикл  по  строкам
            $rownumber++;

            if ($this->selectedrow == $rownumber && $this->selectedclass != "") {
                $row = "<tr class=\"{$this->selectedclass}\" >";
            } else {
                $row = "<tr  >";
            }


            foreach ($this->columns as $fieldname => $column) {       //цикл  по  полям
                if (!$column->visible) {
                    continue;
                }

                $data = strlen($item->{$fieldname}) > 0 ? $item->{$fieldname} : $column->defaultdata;
                $css = strlen($column->rowclass) > 0 ? "class=\"{$column->rowclass}\"" : "";
                $onclick = "";
                $style = "";


                $url = $this->getURLNode() . ':cellclick:' . $fieldname . ':' . $rownumber;
                if ($column->clickable) {

                    $onclick = "window.location='{$url}'";
                }
                if ($column->clickable && $this->useajax) {
                    $onclick = "getUpdate('{$url}&ajax=true');event.returnValue=false; return false;";
                }

                if (strlen($onclick) > 0) {
                    $onclick = " onclick=\"" . $onclick . "\" ";
                    $style = "style=\"cursor:pointer;\"";
                }


                if ($this->cellevent instanceof \Zippy\Event) {
                    $userdata = $this->cellevent->onEvent($this, array('dataitem' => $item, 'field' => $fieldname, 'rownumber' => $rownumber));
                    if ($userdata !== null && $userdata !== false) {
                        $data = $userdata;
                    }
                }

                $row .= ( "<td  {$css} {$onclick} {$style}>{$data}</td>");
            }
            $row .="</tr>";
            $rows .= $row;
        }
        return $rows;
    }
1104674
public function adminRender()
    {
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $result = '';
        if (arg('update'))
        {
            $this->update();
        }
        elseif (arg('toggle'))
        {
            $this->toggle(arg('toggle', 'int'));
        }
        elseif (arg('delete'))
        {
            $this->delete(arg('delete', 'int'));
        }
        elseif (arg('id'))
        {
            $result = $this->edit();
        }
        elseif (arg('action'))
        {
            switch (arg('action'))
            {
                case 'create':
                    $result = $this->create();
                    break;
                case 'insert':
                    $this->insert();
                    break;
            }
        }
        else
        {
            $result = $page->renderTable($this->table);
        }
        return $result;
    }
1104051
public function getQuery(): string
    {
        $sql = $this->getSql();

        $sql = str_replace(['%', '?'], ['%%', '"%s"'], $sql);

        // replace mask by data
        return vsprintf($sql, $this->getParams());
    }
645196
public function renderName(): string
    {
        $tableName = $this->name;

        if (!$this->usePrefix) {
            return $tableName;
        }

        if ($this->dbPrefix && strpos($this->name, $this->dbPrefix) === 0) {
            $tableName = substr($this->name, mb_strlen($this->dbPrefix, 'UTF-8'));
        }

        return '{{%' . $tableName . '}}';
    }