Column flag

@param stdClass $tag
@return string
430299
public function col_flag($tag) {
        global $OUTPUT;
        $tagoutput = new core_tag\output\tagflag($tag);
        return $tagoutput->render($OUTPUT);
    }
1118939
public function get_bbcode($tag)
	{
		if(!isset($this->bbcodes[$tag]))
			return null;

		return $this->bbcodes[$tag];
	}
599905
public function findColumn($label)
    {
        $column = false;
        foreach ($this->getColumns() as $col) {
            if ($col->getLabel() == $label) {
                $column = $col;
                break;
            }
        }

        return $column;
    }
836769
public static function getTagClassName($tag)
	{
		static $map = [
			'BARCODE' => 'BarCode',
			'BLOCKQUOTE' => 'BlockQuote',
			'COLUMN_BREAK' => 'ColumnBreak',
			'COLUMNBREAK' => 'ColumnBreak',
			'DOTTAB' => 'DotTab',
			'FIELDSET' => 'FieldSet',
			'FIGCAPTION' => 'FigCaption',
			'FORMFEED' => 'FormFeed',
			'HGROUP' => 'HGroup',
			'INDEXENTRY' => 'IndexEntry',
			'INDEXINSERT' => 'IndexInsert',
			'NEWCOLUMN' => 'NewColumn',
			'NEWPAGE' => 'NewPage',
			'PAGEFOOTER' => 'PageFooter',
			'PAGEHEADER' => 'PageHeader',
			'PAGE_BREAK' => 'PageBreak',
			'PAGEBREAK' => 'PageBreak',
			'SETHTMLPAGEFOOTER' => 'SetHtmlPageFooter',
			'SETHTMLPAGEHEADER' => 'SetHtmlPageHeader',
			'SETPAGEFOOTER' => 'SetPageFooter',
			'SETPAGEHEADER' => 'SetPageHeader',
			'TBODY' => 'TBody',
			'TFOOT' => 'TFoot',
			'THEAD' => 'THead',
			'TEXTAREA' => 'TextArea',
			'TEXTCIRCLE' => 'TextCircle',
			'TOCENTRY' => 'TocEntry',
			'TOCPAGEBREAK' => 'TocPageBreak',
			'VAR' => 'VarTag',
			'WATERMARKIMAGE' => 'WatermarkImage',
			'WATERMARKTEXT' => 'WatermarkText',
		];

		$className = 'Mpdf\Tag\\';
		$className .= isset($map[$tag]) ? $map[$tag] : ucfirst(strtolower($tag));

		return $className;
	}
630319
public static function row($tags)
    {
        $tags = implode(PHP_EOL, func_get_args());

        $tag_col = self::tag('div', $tags, "col-lg-12", '', array());

        $row = self::tag('div', $tag_col, "row", '', array());

        return $row;

    }
548576
protected function getAnnotationClass($tag)
    {
        if ($this->tagsMapper !== null && $this->tagsMapper->hasMappedTag($tag) === true) {
            return $this->tagsMapper->getMappedTag($tag);
        } elseif (class_exists(__NAMESPACE__ . '\Tags\\' . ucfirst($tag) . 'Tag') === true) {
            return __NAMESPACE__ . '\Tags\\' . ucfirst($tag) . 'Tag';
        } else {
            return __NAMESPACE__ . '\Tags\BaseTag';
        }
    }
1098212
public function format(Tag $tag): string
    {
        return '@' . $tag->getName() . str_repeat(' ', $this->maxLen - strlen($tag->getName()) + 1) . (string) $tag;
    }
925707
protected function get_shortcode_class( $tag ) {
		$shortcode_class = $this->hasConfigKey( $tag, self::KEY_CUSTOM_CLASS )
			? $this->getConfigKey( $tag, self::KEY_CUSTOM_CLASS )
			: self::DEFAULT_SHORTCODE;

		return $shortcode_class;
	}
821799
public static function tagIncrementVer($tag)
        {
            if (!$tag) {
                return false;
            }

            $time = microtime(true) * 10000;

            if (is_array($tag)) {
                foreach ($tag as $tagName) {
                    self::GetInstance()->set("\$vxnTag:{$tagName}", $time, null, self::$ttlTags);
                    if (self::$useTagsBuffer) {
                        self::$tagsBuffer[$tagName] = $time;
                    }
                }

                return true;
            }
            else if (is_string($tag) || is_numeric($tag)) {
                self::GetInstance()->set("\$vxnTag:{$tag}", $time, null, self::$ttlTags);
                if (self::$useTagsBuffer) {
                    self::$tagsBuffer[$tag] = $time;
                }

                return $time;
            }

            throw new \TypeError("'\$tag' expected to be an array, string or numeric, got " . gettype($tag));
        }
1004019
protected function getSgrStyleSequence(string $tag): string
	{
		$styles = implode(';', $this->getStyleCodes($tag));

		return sprintf("\033[%sm", $styles);
	}
1316757
public static function tagToName(int $tag): string
    {
        if (!array_key_exists($tag, self::MAP_TYPE_TO_NAME)) {
            return "TAG $tag";
        }
        return self::MAP_TYPE_TO_NAME[$tag];
    }
629747
public function getColumnsLabel($columns, $table)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = $this->_currentModel;
        /** @var Module $module */
        $module = $this->module;
        $attributeLabels = $model->attributeLabels();
        $relations = $module->tables[$table]['relations'];
        $columnsLabel = [];
        foreach ($columns as $attribute) {
            if (isset($attributeLabels[$attribute])) {
                $columnsLabel[] = $attributeLabels[$attribute];
            } elseif (isset($relations[$attribute]['label'])) {
                $columnsLabel[] = $relations[$attribute]['label'];
            } else {
                $columnsLabel[] = $attribute;
            }
        }

        return $columnsLabel;
    }
135151
public function getColumnContent($gridField, $record, $columnName)
    {
        $flagContent = '';
        $flags = $this->getStatusFlags($record);
        foreach ($flags as $class => $data) {
            $flagAttributes = [
                'class' => "ss-gridfield-badge badge status-{$class}",
            ];
            if (isset($data['title'])) {
                $flagAttributes['title'] = $data['title'];
            }
            $flagContent .= ' ' . HTML::createTag('span', $flagAttributes, Convert::raw2xml($data['text']));
        }
        return $flagContent;
    }
1095202
public function tagIf($tag, $content)
    {
        $condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition'];
        $condition = $this->parseCondition($condition);
        $parseStr  = '<?php if(' . $condition . '): ?>' . $content . '<?php endif; ?>';

        return $parseStr;
    }
1237005
private function formatTags(array $tags = [])
    {
        if (!$this->dataDog || count($tags) === 0) {
            return '';
        }

        $result = [];
        foreach ($tags as $key => $value) {
            if (is_numeric($key)) {
                $result[] = $value;
            } else {
                $result[] = sprintf('%s:%s', $key, $value);
            }
        }

        return sprintf('|#%s', implode(',', $result));
    }
673392
public function col_select($tag) {
        $id = "tagselect" . $tag->id;
        return html_writer::label(get_string('selecttag', 'tag', $tag->rawname), $id,
                false, array('class' => 'accesshide')).
                html_writer::empty_tag('input', array('type' => 'checkbox',
                'name' => 'tagschecked[]', 'value' => $tag->id, 'id' => $id));
    }
682624
protected function outputIgnoreTag(Tag $tag)
	{
		$tagPos = $tag->getPos();
		$tagLen = $tag->getLen();

		// Capture the text to ignore
		$ignoreText = substr($this->text, $tagPos, $tagLen);

		// Catch up with the tag's position then output the tag
		$this->outputText($tagPos, 0, false);
		$this->output .= '<i>' . htmlspecialchars($ignoreText, ENT_NOQUOTES, 'UTF-8') . '</i>';
		$this->isRich = true;

		// Move the cursor past this tag
		$this->pos = $tagPos + $tagLen;
	}