Creates a [[DataColumn]] object based on a string in the format of "attribute:format:label".
@param string $text the column specification string
@return DataColumn the column instance
@throws InvalidConfigException if the column specification is invalid
344554
protected function createDataColumn($text)
    {
        if (!preg_match('/^([^:]+)(:(\w*))?(:(.*))?$/', $text, $matches)) {
            throw new InvalidConfigException('The column must be specified in the format of "attribute", "attribute:format" or "attribute:format:label"');
        }

        return Yii::createObject([
            'class' => $this->dataColumnClass ? : TreeColumn::className(),
            'grid' => $this,
            'attribute' => $matches[1],
            'format' => isset($matches[3]) ? $matches[3] : 'text',
            'label' => isset($matches[5]) ? $matches[5] : null,
        ]);
    }
1332126
public function setText($text)
    {
        if (!is_string($text)) {
            throw new InvalidArgumentException('string', 0);
        }

        $text = trim($text);

        if (strpos($text, '#') !== 0) {
            $text = '# ' . $text;
        }

        $this->text = $text;

        return $this;
    }
656574
public function write(&$text)
    {
        $matches = array();

        if (preg_match_all('/<a(.*?)>/', $text, $matches)) {
            foreach ($matches[1] as $index => $match) {
                $attribs = $this->_parseAttributes($match);
                $attribs['style'] = 'color:#076da0;text-decoration:none';
                $attribs = AnHelperArray::toString($attribs);
                $text = str_replace($matches[0][$index], '<a '.$attribs.' >', $text);
            }
        }

        return $this;
    }
357037
public function filter(&$text)
    {
        $matches = array();

        if(preg_match_all('#<ktml:toolbar([^>]*)>#siU', $text, $matches))
        {
            foreach($matches[0] as $key => $match)
            {
                $attributes = $this->parseAttributes($matches[1][$key]);

                //Create attributes array
                $config = new KObjectConfig($attributes);
                $config->append(array(
                    'type'  => 'actionbar',
                ));

                $helper = $this->getTemplate()->createHelper($config->type);

                $html = '';
                if($toolbar = $this->getToolbar($helper->getToolbarType()))
                {
                    $config->toolbar = $toolbar; //set the toolbar in the config

                    $html = $helper->render($config);
                }

                //Remove placeholder
                $text = str_replace($match, $html, $text);
            }
        }

        return $this;
    }
815824
public function setText($text)
    {
        $this->text = $text;
        $this->encodeManager->setData($text);

        return $this;
    }
1119021
public function setText($text) {
		if( !is_string($text) ) {
			throw new \Exception('RequireStringParameter');
		}
		$this->setTEXTBody(strip_tags($text));
		$this->setHTMLBody(nl2br($text));
	}
895829
public function setText(string $text): self
    {
        $text = trim($text);
        if ('' === $text) {
            throw new Exception('The text can not be empty');
        }

        $this->text = $text;

        return $this;
    }
8848
private function initPayload($text)
    {
        $payload = new Payload();
        $payload->setOptions($this->getOptions());
        $payload->setQueryText($text);
        return $payload->createPayload();
    }
616269
public function addText($text) {
		$content = new HtmlString();
		$content->htmlString = $text;
		$this->children[] = $content;
		return $this;
	}
72109
public function parse($text) {
        $parsedText = $this->parseGs1128($text);
        if($this->customLabelText!==false and CINBarcode1D::AUTO_LABEL!=$this->customLabelText){
            parent::setLabel($this->customLabelText);    
        }
        parent::parse($parsedText);
    }
265700
protected function parseTableStructure($text)
    {
        $dom = $this->createDocumentWithHtml($text);

        $tableNode = $dom->getElementsByTagName('table')->item(0);

        $table = new Table($tableNode);

        $this->parseTable($table);

        return $table;
    }
697205
public function format($text, $formatOptions = array())
    {
        if (!is_array($formatOptions)) {
            $formatOptions = array('fgcolor' => $formatOptions);
        }
        $formatOptions = array_merge($this->defaultFormatOptions, $formatOptions);
        $formater = new TextFormater($formatOptions);
        return $formater->format($text);
    }
552206
public function init()
    {
        if ($this->query === null) {
            throw new InvalidConfigException(get_class($this) . '::$query must be set.');
        }

        if ($this->formatData === null) {
            $this->formatData = function ($query, $columns) {
                $rows = [];
                foreach ($query->all() as $obj) {
                    $row = [];
                    foreach ($columns as $column) {
                    	if ($column['data']) {
		                    $value = ArrayHelper::getValue($obj, $column['data'], null);
		                    if (($pos = strrpos($column['data'], '.')) !== false) {
			                    $keys = explode('.', $column['data']);
			                    $a = $value;
			                    foreach (array_reverse($keys) as $key) {
				                    $a = [$key => $a];
			                    }
			                    $row[$keys[0]] = $a[$keys[0]];
		                    } else {
			                    $row[$column['data']] = $value;
		                    }
	                    }
                    }
                    $rows[] = $row;
                }

                return $rows;
            };
        }
    }
83977
protected function createTextColumn($totalCoef, $columnData, $postX, $height, $autoNewLine = false, $maxLines = 1)
    {
        $label = $this->labelFactory->create(
            $columnData['text'],
            AssociativeArray::getFromKey($columnData, 'translatable', false),
            $this->type
        );
        $label->setHeight($height - 1);
        $label->setWidth(($columnData["width"] * $totalCoef) - 0.5);
        $label->setPosition($postX, -($height / 2));
        $label->setAutoNewLine($autoNewLine);
        $label->setMaxLines($maxLines);

        return $label;
    }
74720
public static function prepare_attr_value ($text) {
		if (is_array($text)) {
			/** @noinspection ForeachSourceInspection */
			foreach ($text as &$t) {
				$t = static::prepare_attr_value($t);
			}
			return $text;
		}
		return strtr(
			$text,
			[
				'&'  => '&amp;',
				'"'  => '&quot;',
				'\'' => '&apos;',
				'<'  => '&lt;',
				'>'  => '&gt;'
			]
		);
	}
404636
public function setText($text)
	{
		if (!is_array($text) && !$text instanceof self) {
			$text = htmlspecialchars((string)$text, ENT_NOQUOTES, 'UTF-8');
		}

		return $this->setHtml($text);
	}
391546
public function setText(string $text): self
    {
        return $this->addPart(Part::create($text, 'text/plain'), true);
    }