@param int $row
@param array $row_data
@param Linker $linker

@return string
516954
public function getView(int $row, array $row_data, Linker $linker): string
    {
        $value = $this->getCellData($row_data);
        $cell_data = '<form action="'. $this->getParsedHref($row_data, $linker) .'" method="post"><input onclick="'. ($this->onclick ?: 'this.form.submit();') .'" type="radio"'. ($value ? ' checked="checked"' : '') .' name="input" class="noBorder" value="'. htmlspecialchars($value, ENT_QUOTES) .'"></form>';

        return $this->getCellView($cell_data, $row_data);
    }
906562
public function show(string $linker, array $params = [])
    {
        $path = $this->buildLinkersPath($linker);

        return $this->get($path, $params);
    }
690170
private function rowToArray(Row $row, $locale, $webspaceKey, $fields, $onlyPublished = true)
    {
        // reset cache
        $this->initializeExtensionCache();
        $templateName = $this->encoder->localizedSystemName('template', $locale);

        // check and determine shadow-nodes
        $node = $row->getNode('page');

        try {
            $document = $this->documentManager->find($node->getIdentifier(), $locale);
        } catch (StructureTypeNotFoundException $e) {
            return false;
        }

        $originalDocument = $document;

        if (!$node->hasProperty($templateName) && !$node->hasProperty('template')) {
            return false;
        }

        $redirectType = null;
        $url = null;
        if ($document instanceof RedirectTypeBehavior) {
            $redirectType = $document->getRedirectType();

            if (RedirectType::INTERNAL === $redirectType) {
                $target = $document->getRedirectTarget();

                if ($target) {
                    $url = $target->getResourceSegment();

                    $document = $target;
                    $node = $this->inspector->getNode($document);
                }
            }

            if (RedirectType::EXTERNAL === $redirectType) {
                $url = $document->getRedirectExternal();
            }
        }

        $originLocale = $locale;
        if ($document instanceof ShadowLocaleBehavior) {
            $locale = $document->isShadowLocaleEnabled() ? $document->getShadowLocale() : $originLocale;
        }

        $nodeState = null;
        if ($document instanceof WorkflowStageBehavior) {
            $nodeState = $document->getWorkflowStage();
        }

        // if page is not piblished ignore it
        if ($onlyPublished && WorkflowStage::PUBLISHED !== $nodeState) {
            return false;
        }

        if ($document instanceof ResourceSegmentBehavior && !isset($url)) {
            $url = $document->getResourceSegment();
        }

        // generate field data
        $fieldsData = $this->getFieldsData(
            $row,
            $node,
            $document,
            $fields[$originLocale],
            $document->getStructureType(),
            $webspaceKey,
            $locale
        );

        $structureType = $document->getStructureType();
        $shortPath = $this->inspector->getContentPath($originalDocument);

        $documentData = [
            'uuid' => $originalDocument->getUuid(),
            'nodeType' => $redirectType,
            'path' => $shortPath,
            'changed' => $document->getChanged(),
            'changer' => $document->getChanger(),
            'created' => $document->getCreated(),
            'publishedState' => WorkflowStage::PUBLISHED === $nodeState,
            'published' => $document->getPublished(),
            'creator' => $document->getCreator(),
            'title' => $originalDocument->getTitle(),
            'locale' => $locale,
            'webspaceKey' => $this->inspector->getWebspace($document),
            'template' => $structureType,
            'parent' => $this->inspector->getParent($document)->getUuid(),
        ];

        if (isset($url)) {
            $documentData['url'] = $url;
            $documentData['urls'] = $this->inspector->getLocalizedUrlsForPage($document);
        }

        if ($document instanceof LocalizedAuthorBehavior) {
            $documentData['author'] = $document->getAuthor();
            $documentData['authored'] = $document->getAuthored();
        }

        if ($document instanceof OrderBehavior) {
            $documentData['order'] = $document->getSuluOrder();
        }

        return array_merge($documentData, $fieldsData);
    }
1285651
public function getAttributesView($style_to_replace = '', array $row_data = [])
    {
        $attr = [];

        if ($this->width) {
            $attr['width'] = 'width="' . $this->width . '"';
        }
        if ($this->align) {
            $attr['align'] = 'align="' . $this->align . '"';
        }
        if ($this->nowrap) {
            $attr['nowrap'] = 'nowrap="nowrap"';
        }
        if ($this->onclick) {
            $attr['onclick'] = 'onclick="' . ($row_data ? $this->replaceTemplateVars($row_data, $this->getOnclick()) : $this->onclick) . '"';
        }
        if ($this->onchange) {
            $attr['onchange'] = 'onchange="' . ($row_data ? $this->replaceTemplateVars($row_data, implode(';', $this->getOnchange())) : implode(';', $this->getOnchange())) . '"';
        }
        if ($this->key) {
            $attr['data-column_key'] = 'data-column_key="' . $this->key . '"';
        }
        if ($this instanceof ColumnOrder && $row_data) {
            $attr['data-order'] = 'data-order="' . $this->getCellData($row_data) . '"';
        }
        if (isset($row_data['id'])) {
            $attr['data-id'] = 'data-id="' . $row_data['id'] . '"';
        }

        if ($style_to_replace) {
            $attr['style'] = 'style="' . $style_to_replace . '"';
        } elseif ($this->style) {
            $attr['style'] = 'style="' . $this->style . '"';
        }

        if (\count($attr) === 0) {
            return '';
        }

        return ' ' . implode(' ', $attr) . $this->getDataAttributesHtml($row_data);
    }
784976
public function col_allocatedmarker(stdClass $row) {
        static $markers = null;
        static $markerlist = array();
        if ($markers === null) {
            list($sort, $params) = users_order_by_sql('u');
            // Only enrolled users could be assigned as potential markers.
            $markers = get_enrolled_users($this->assignment->get_context(), 'mod/assign:grade', 0, 'u.*', $sort);
            $markerlist[0] = get_string('choosemarker', 'assign');
            $viewfullnames = has_capability('moodle/site:viewfullnames', $this->assignment->get_context());
            foreach ($markers as $marker) {
                $markerlist[$marker->id] = fullname($marker, $viewfullnames);
            }
        }
        if (empty($markerlist)) {
            // TODO: add some form of notification here that no markers are available.
            return '';
        }
        if ($this->is_downloading()) {
            if (isset($markers[$row->allocatedmarker])) {
                return fullname($markers[$row->allocatedmarker],
                        has_capability('moodle/site:viewfullnames', $this->assignment->get_context()));
            } else {
                return '';
            }
        }

        if ($this->quickgrading && has_capability('mod/assign:manageallocations', $this->assignment->get_context()) &&
            (empty($row->workflowstate) ||
             $row->workflowstate == ASSIGN_MARKING_WORKFLOW_STATE_INMARKING ||
             $row->workflowstate == ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED)) {

            $name = 'quickgrade_' . $row->id . '_allocatedmarker';
            return  html_writer::select($markerlist, $name, $row->allocatedmarker, false);
        } else if (!empty($row->allocatedmarker)) {
            $output = '';
            if ($this->quickgrading) { // Add hidden field for quickgrading page.
                $name = 'quickgrade_' . $row->id . '_allocatedmarker';
                $attributes = ['type' => 'hidden', 'name' => $name, 'value' => $row->allocatedmarker];
                $output .= html_writer::empty_tag('input', $attributes);
            }
            $output .= $markerlist[$row->allocatedmarker];
            return $output;
        }
    }
433100
protected function listBannerInternal($row)
    {
        if ($row['banner_image'] == '')
        {
            return '<p class="error">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_read_error'].' (1)</p>';
        }
        //convert DB file ID into file path ($objFile->path)
        $objFile = \FilesModel::findByUuid($row['banner_image']);
        if ($objFile === null)
        {
            // Check for version 3 format
            if (!\Validator::isUuid($row['banner_image']))
            {
                return '<p class="error">'.$GLOBALS['TL_LANG']['ERR']['version2format'].'</p>';
            }
            return '<p class="error">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_read_error'].' (2)</p>';
        }
    
        //get image size
        $arrImageSize = $this->BannerImage->getBannerImageSize($objFile->path, self::BANNER_TYPE_INTERN);
    
        //resize if necessary
        $arrImageSizeNew = array();
        switch ($arrImageSize[2])
        {
            case 1: // GIF
            case 2: // JPG
            case 3: // PNG
                $arrImageSizeNew = $this->BannerImage->getCheckBannerImageSize($arrImageSize,250,200);
                $intWidth  = $arrImageSizeNew[0];
                $intHeight = $arrImageSizeNew[1];
                $oriSize   = $arrImageSizeNew[2];
                if ($oriSize || $arrImageSize[2] == 1) // GIF)
                {
                    $banner_image = $this->urlEncode($objFile->path);
                }
                else
                {
                    $banner_image = \Image::get($this->urlEncode($objFile->path), $intWidth, $intHeight);
                }
                break;
            case 4:  // Flash swf
            case 13: // Flash swc
                $arrImageSizeNew = $this->BannerImage->getCheckBannerImageSize($arrImageSize,250,200);
                $intWidth  = $arrImageSizeNew[0];
                $intHeight = $arrImageSizeNew[1];
                $oriSize   = $arrImageSizeNew[2];
                $banner_image = $objFile->path;
                 
                $fallback_content = '<br><span style="font-weight: normal;">'.$GLOBALS['TL_LANG']['tl_banner']['source_fallback_no'].'</span>';
                $src_fallback = $this->BannerImage->getCheckBannerImageFallback($objFile->path, $intWidth, $intHeight);
                if ( $src_fallback !== false)
                {
                    $fallback_content = '<br><img src="' . $src_fallback . '" alt="'.specialchars(ampersand($row['banner_name'])).'" height="'.$intHeight.'" width="'.$intWidth.'"><br><span style="font-weight: normal;">'.$GLOBALS['TL_LANG']['tl_banner']['source_fallback'].'</span>';
                }
                break;
            default:
                break;
        }
    
        //Banner Ziel per Page?
        if ($row['banner_jumpTo'] >0)
        {
            //url generieren
            $objBannerNextPage = \Database::getInstance()->prepare("SELECT id, alias FROM tl_page WHERE id=?")
                                                ->limit(1)
                                                ->execute($row['banner_jumpTo']);
            if ($objBannerNextPage->numRows)
            {
                $row['banner_url'] = $this->generateFrontendUrl($objBannerNextPage->fetchAssoc());
            }
        }
        $banner_url = ampersand(\Idna::decode($row['banner_url']));
        $banner_url_text = $GLOBALS['TL_LANG']['tl_banner']['banner_url'][0].': ';
        
        if ( strlen($banner_url) <1 && $row['banner_jumpTo'] <1 )
        {
            //weder externe URL noch interne Seite definiert
            $banner_url = $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined'];
        }
        if ( strlen($banner_url) <1 && $row['banner_jumpTo'] >0 )
        {
            //externe Seite definiert die aber nicht mehr existiert ($banner_url<1)
            $banner_url = '<span class="tl_gerror">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_page_not_found'].'</span>';
        }
    
        //Output
        switch ($arrImageSize[2])
        {
            case 1: // GIF
            case 2: // JPG
            case 3: // PNG
                $output = '<div class="mod_banner_be">' .
                        '<div class="name"><img alt="'.specialchars(ampersand($row['banner_name'])).'" src="'. $banner_image .'" height="'.$intHeight.'" width="'.$intWidth.'" /></div>' .
                        '<div class="right">' .
                        '<div class="left">'.
                        '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                        '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                        '</div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                        '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_intern'] .'</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                        '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                        '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                        '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                        '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '</div>' .
                        '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ).'</div>' .
                        '</div>';
                break;
            case 4:  // Flash swf
            case 13: // Flash swc
                $output = '<div class="mod_banner_be">' .
                        '<div class="name"><div id="flash_'.$row['id'].'">'.specialchars(ampersand($row['banner_name'])).'</div>'.$fallback_content.'</div>' .
                        '<div class="right">' .
                        '<div class="left">'.
                        '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                        '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                        '</div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                        '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_intern'] .'</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                        '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                        '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                        '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                        '</div>' .
                        '<div class="left">' .
                        '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                        '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                        '</div>' .
                        '<div style="clear:both;"></div>'.
                        '</div>' .
                        '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ). '</div>' .
                        '</div>' .
                        '<script>
	new Swiff("'.$banner_image.'", {
	  id: "flash_'.$row['id'].'",
	  width: '.$intWidth.',
	  height: '.$intHeight.',
	  params : {
	  allowfullscreen: "true",
	  wMode: "transparent",
	  flashvars: ""
	  }
	}).replaces($("flash_'.$row['id'].'"));
	</script>';
                break;
            default:
                break;
        }//switch
    
        if ($arrImageSize === false)
        {
            //Interne Banner Grafik
            $output = '<div class="mod_banner_be">' .
                    '<div class="name"><span style="color:red;">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_read_error'].'</span><br />'.$this->urlEncode($objFile->path).'</div>' .
                    '<div class="right">' .
                    '<div class="left">'.
                    '<div class="published_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_published'][0].'</div>'.
                    '<div class="published_data">'.($row['banner_published'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_no'] : $GLOBALS['TL_LANG']['tl_banner']['tl_be_yes']).' </div>'.
                    '</div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['banner_type'][0].'</div>' .
                    '<div class="date_data">'.$GLOBALS['TL_LANG']['tl_banner']['source_intern'] .'</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_start'].'</div>' .
                    '<div class="date_data">' . ($row['banner_start']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_start'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_start'])) . '</div>' .
                    '</div>' .
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_stop'].'</div>' .
                    '<div class="date_data">' . ($row['banner_stop'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_stop'] : date($GLOBALS['TL_CONFIG']['datimFormat'], $row['banner_stop'])) . '</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_views'].'</div>' .
                    '<div class="date_data">' . ($row['banner_views_until']=='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_views_until']) . '</div>' .
                    '</div>' .
                    '<div class="left">' .
                    '<div class="date_head">'.$GLOBALS['TL_LANG']['tl_banner']['tl_be_max_clicks'].'</div>' .
                    '<div class="date_data">' . ($row['banner_clicks_until'] =='' ? $GLOBALS['TL_LANG']['tl_banner']['tl_be_not_defined_max'] : $row['banner_clicks_until']) . '</div>' .
                    '</div>' .
                    '<div style="clear:both;"></div>'.
                    '</div>' .
                    '<div class="url">'.$banner_url_text . (strlen($banner_url)<80 ? $banner_url : substr($banner_url, 0, 36)."[...]".substr($banner_url,-36,36) ).'</div>' .
                    '</div>';
        }
    
        $key = $row['banner_published'] ? 'published' : 'unpublished';
        $style = 'style="font-size:11px;margin-bottom:10px;"';
        $output_h = '<div class="cte_type ' . $key . '" ' . $style . '><strong>' . specialchars(ampersand($row['banner_name'])) . '</strong></div>';
        return $output_h . $output;
    }
1239158
public function print($row_key)
    {
        $this->calculateDimensions();
        $result = '';
        
        if ($this->getPrintHeader()) {
            $result .= $this->printHeader();
        } else {
            $result .= $this->printRowLine();
        }
        
        if (! is_null($row_key)) {
            $result .= $this->printRow($row_key, $this->getRows()[$row_key]);
        } else {
            foreach ($this->getRows() as $key => $data) {
                $result .= $this->printRow($key, $data);
            }
        }
        
        $result .= $this->printRowLine(false);
        
        return $result;
    }
481905
protected function messageTitleFromRow(array $row)
    {
        $ret = array();

        if (!empty($row['title'])) {
            $ret[] = '"' . htmlspecialchars($row['title']) . '"';
        }

        if (!empty($row['uid'])) {
            $ret[] = '[UID #' . htmlspecialchars($row['uid']) . ']';
        }

        return implode(' ', $ret);
    }
778220
public function encodeSegment(array $row): string
    {
        // init
        $str = '';
        $t = \count($row);

        foreach ($row as $i => &$iValue) {
            if (\is_array($iValue)) {
                if (\count($iValue) === 1
                    && \is_array(\reset($iValue))
                ) {
                    $iValue = \array_pop($iValue);
                }

                if (\is_array($iValue)) {
                    foreach ($iValue as &$temp) {
                        $temp = $this->escapeValue($temp);
                    }
                    unset($temp);
                }

                $elm = \implode($this->sepComp, $iValue);
            } else {
                $elm = $this->escapeValue($iValue);
            }

            $str .= $elm;
            if ($i == $t - 1) {
                break;
            }
            $str .= $this->sepData;
        }
        unset($iValue);

        $str .= $this->symbEnd;

        return $str;
    }
206714
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::ROW_ID];
    }
318068
protected function getCheckedState($row, $data)
	{
		return ($this->value === null)
			? CHtml::value($data, $this->name)
			: $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
	}
1032833
public function getValue($row, Table $table) {
        $image = $this->getHTMLImage($row, $table);
        if (!$this->href) {
            return $image;
        }
        $href = "";
        if (is_string($this->href)) {
            eval("\$href = {$this->href}");
        } elseif (is_callable($this->href)) {
            $href = call_user_func($this->href, $row, $table);
        }
        return ("" != ($r = Html::get()->link($href, $image, $this->linkHtmlOptions))) ? $r : $image;
    }
301649
public function encode(array $row): string
    {
        $stream = fopen('php://memory', 'r+');
        fputcsv($stream, $row, "\t");
        rewind($stream);
        $line = fgets($stream);
        fclose($stream);
        return $line;
    }
170061
public function visitRow(RowInterface $row)
    {
        $template = 'row/base.twig';

        return $this
            ->loadTemplate($template)
            ->render(
                [
                    "hash" => $row->getId(),
                    "classes" => $row->getClasses(),
                    "data" => $row->getData(),
                    "writables" => $row->getWritableBearer()->getWritables(),
                    "labels" => $row->getLabels(),
                    "highlightable" => $row->isHighlightable(),
                    "onClick" => $row->getOnClick(),
                ]
            );
    }
1158111
public static function loadLinkInfo($link_id)
    {
        global $CFG, $PDOX, $CONTEXT;

        $cacheloc = 'lti_link';
        $row = Cache::check($cacheloc, $link_id);
        if ( $row != false ) return $row;
        $stmt = $PDOX->queryDie(
            "SELECT title FROM {$CFG->dbprefix}lti_link
                WHERE link_id = :LID AND context_id = :CID",
            array(":LID" => $link_id, ":CID" => $CONTEXT->id)
        );
        $row = $stmt->fetch(\PDO::FETCH_ASSOC);
        Cache::set($cacheloc, $link_id, $row);
        return $row;
    }
810288
public function getView(int $row, array $row_data, Linker $linker): string
    {
        $cell = '';
        $id = $this->getCellData($row_data, $this->id_column);
        $for_show = $this->getCellData($row_data, $this->show_key);

        if ($this->href) {
            $for_show = '<a class="nounderline" href="' . $this->getParsedHref($row_data, new Linker((\defined('P') ? P : ''), $_GET['do'] ?? '')) . '">' . $for_show . '</a>';
        }

        if ($this->ajax) {
            // Check that we have child data
            if (!isset($row_data['ajax_tree_leaf'])) {
                throw new RuntimeException('If you are using ColumnTree with ajax and table contains data array not sql, please add following column to select:
                    ",IF ((SELECT `' . $this->id_column . '` FROM `YOUR_TABLE` WHERE `' . $this->pid_column . '` = `YOUR_TABLE_ALIAS`.`' . $this->id_column . '` LIMIT 1) IS NULL, 1, 0) AS `ajax_tree_leaf`"');
            }

            $cell = '<div style="padding-left: '
                . (($this->getRowLevel($id) + (isset($_GET['ajax_tree_node_lvl']) ? (int)$_GET['ajax_tree_node_lvl'] : 0)) * $this->child_padding)
                . 'px">'
                . (!$row_data['ajax_tree_leaf']
                    ? '<a href="" class="nounderline" style="font-family: monospace;" id="toggle_'
                        . $id
                        . '" onclick="'
                        . $this->js_object_name
                        . '.toggleAjax(\'' . $id . '\'); return false;">+</a>&nbsp;'
                    : '<span style="visibility: hidden; style="font-family: monospace;">+</span>&nbsp;'
                )
                . $for_show . '</div>';
        } else {
            $cell = '<div style="padding-left: '
                . ($this->getRowLevel($id) * $this->child_padding)
                . 'px">'
                . (isset($this->child_ids[$id]) && $this->child_ids[$id]['children']
                    ? '<a href="" class="nounderline" style="font-family: monospace;" id="toggle_'
                        . $id
                        . '" onclick="'
                        . $this->js_object_name
                        . '.toggle(\'' . $id . '\'); return false;">+</a>&nbsp;'
                    : '<span style="visibility: hidden; style="font-family: monospace;">+</span>&nbsp;'
                ) . $for_show . '</div>';
        }

        return $this->getCellView($cell, $row_data);
    }
706840
public function renderRowDefinition(PHPRtfLite_Table_Row $row)
    {
        $rowIndex = $row->getRowIndex();
        $stream = $this->getRtf()->getWriter();
        $stream->write('\trowd');

        if ($this->_alignment) {
            switch ($this->_alignment) {
                case self::ALIGN_CENTER:
                    $stream->write('\trqc');
                    break;

                case self::ALIGN_RIGHT:
                    $stream->write('\trqr');
                    break;

                default:
                    $stream->write('\trql');
                    break;
            }
        }

        $rowHeight = $row->getHeight();
        if ($rowHeight) {
            $stream->write('\trrh' . PHPRtfLite_Unit::getUnitInTwips($rowHeight));
        }

        if ($this->isPreventPageBreak()) {
            $stream->write('\trkeep ');
        }

        if ($this->isFirstRowHeader() && $rowIndex == 1) {
            $stream->write('\trhdr ');
        }

        if ($this->getLeftPosition() != '') {
            $stream->write('\trleft' . PHPRtfLite_Unit::getUnitInTwips($this->getLeftPosition()) . ' ');
        }

        $width = 0;
        foreach ($this->getColumns() as $columnIndex => $column) {
            $cell = $this->getCell($rowIndex, $columnIndex + 1);

            // render cell definition
            if (!$cell->isHorizontalMerged()) {
                $cell->renderDefinition();

                // cell width
                $width += PHPRtfLite_Unit::getUnitInTwips($cell->getWidth());
                $stream->write('\cellx' . $width);
            }
        }
    }