@param string $type
@param string $content
@param array $options

@return string
763550
public static function renderElement($type, $content, $options = [])
    {
        $tag = ArrayHelper::remove($options, 'tag', 'div');

        $class = ArrayHelper::remove($options, 'class');
        Html::addCssClass($options, 'ui ' . $class . ' ' . $type);

        return Html::tag($tag, $content, $options);
    }
310506
public function send($content = null, $type = null) 
    {
        if (!is_null($content)) {
            $this->setContents(is_array($content) ? $content : array($content));
        }
        if (!is_null($type)) {
            $this->setContentType($type);
        }
        return parent::send();
    }
812660
protected function _contentAttribute($content = '', $_attributes, $type)
    {
        $type   = strtolower($type);

        $perm   = $this->settings['attr']['perm'] ?? NULL;
        
        $return = '<'.$type.$this->attributes($_attributes).'>'.$this->stringOrCallback($content)."</$type>".EOL;

        $this->outputElement .= $this->_perm($perm, $return);

        return $this;
    }
831584
public static function purify($content, array $options = [])
    {
        $config = HTMLPurifier_Config::createDefault();

        foreach ($options as $key => $value) {
            $config->set($key, $value);
        }

        if (!file_exists($config->get('Cache.SerializerPath'))) {
            mkdir($config->get('Cache.SerializerPath'));
        }

        $purifier = new HTMLPurifier($config);

        return $purifier->purify($content);
    }
821021
public function updateSelf(array $content, array $options = [])
    {
        $response = $this->query(
            $this->buildQueryArgs('auth', 'updateSelf'),
            [
                'body' => $content
            ],
            $options
        );

        return $response['result'];
    }
239391
protected function doMinify($content, array $options = [])
	{
		$cssmin = new CSSmin;

		// Flagged comments
		if (isset($options[static::FLAGGED_COMMENTS]))
		{
			$cssmin->setFlaggedComments($options[static::FLAGGED_COMMENTS]);
		}

		// Rewrite
		if (isset($options[static::URI_REWRITE]))
		{
			$content = UriRewriter::rewrite(
				$content,
				isset($options['current_dir']) ? $options['current_dir'] : '',
				isset($options['doc_root']) ? $options['root'] : $_SERVER['DOCUMENT_ROOT']
			);
		}

		return $cssmin->run($content);
	}
779211
protected function doMinify($content, array $options = [])
	{
		try
		{
			ob_start();
			$content = $this->lock($content);
			$this->minifyDirectToOutput($content . ';', $options);

			// Sometimes there's a leading new line, so we trim that out here.
			$content = ltrim(ob_get_clean());
			$content = $this->unlock($content);

			return $content;
		}
		catch (\Exception $e)
		{
			// without this call things get weird, with partially outputted js.
			ob_end_clean();
			throw $e;
		}
		catch (\Throwable $e)
		{
			// without this call things get weird, with partially outputted js.
			ob_end_clean();
			throw $e;
		}
	}
368824
final protected function header(string $content, string $type = null)
    {
        Response::header($content, $type);
    }
1155412
public function transform($content, $options = [])
    {
        if (!$content instanceof \DateInterval) {
            return 0;
        }

        $decTime = 0;
        $decTime += ($content->d ? $content->d * 60 * 24 : 0);
        $decTime += ($content->h ? $content->h * 60 : 0);
        $decTime += $content->i;
        $decTime += ($content->s ? $content->s / 60 : 0);

        return $decTime;
    }
12621
protected function _getTypeOutput(array $options, $url, $type)
    {
        $type = Str::low($type);
        if ($type === 'css') {
            return $this->_getCssOutput($options, $url);
        }

        return $this->_getScriptOutput($options, $url);
    }
163758
public function fromString($value, $type, array $options)
    {
        return $this->convert($value, $type, $options, $this->getFromStringCallbacks());
    }
600850
public function transform($content, $options = [])
    {
        if (!$content) {
            return $content;
        }

        return self::TRANSFORM_PREFIX . md5((string) $content);
    }
619248
public function toString($value, $type, array $options)
    {
        return $this->convert($value, $type, $options, $this->getToStringCallbacks());
    }
183008
protected function compress($content, $type, $options = array())
    {
        $pb = $this->createProcessBuilder(array($this->javaPath));

        if (null !== $this->stackSize) {
            $pb->add('-Xss'.$this->stackSize);
        }

        $pb->add('-jar')->add($this->jarPath);

        foreach ($options as $option) {
            $pb->add($option);
        }

        if (null !== $this->charset) {
            $pb->add('--charset')->add($this->charset);
        }

        if (null !== $this->lineBreak) {
            $pb->add('--line-break')->add($this->lineBreak);
        }

        // input and output files
        $tempDir = FilesystemUtils::getTemporaryDirectory();
        $input = tempnam($tempDir, 'assetic_yui_input');
        $output = tempnam($tempDir, 'assetic_yui_output');
        file_put_contents($input, $content);
        $pb->add('-o')->add($output)->add('--type')->add($type)->add($input);

        $proc = $pb->getProcess();
        $code = $proc->run();
        unlink($input);

        if (0 !== $code) {
            if (file_exists($output)) {
                unlink($output);
            }

            throw FilterException::fromProcess($proc)->setInput($content);
        }

        if (!file_exists($output)) {
            throw new \RuntimeException('Error creating output file.');
        }

        $retval = file_get_contents($output);
        unlink($output);

        return $retval;
    }
610559
public function add(string $content, array $options = [])
    {
        $options = array_intersect_key($options, self::$columns_options_def) + self::$columns_options_def;
        $options['content'] = $content;

        $this->columns[] = $options;

        return $this;
    }
10467
public function display($content, $options = [])
    {
        $pages = [];
        $page_ids = [];
        if (isset($options['reverse'])) {
            // get page_ids on which current page is selected in this block
            $currentPageId = PageBuilder::pageId(true);
            if ($currentPageId) {
                $same_blocks = PageBlock::where('block_id', '=', $this->_block->id)->get();
                foreach ($same_blocks as $same_block) {
                    $block_page_ids = @unserialize($same_block->content);
                    if (!empty($block_page_ids)) {
                        foreach ($block_page_ids as $k => $block_page_id) {
                            $block_page_id = Path::unParsePageId($block_page_id);
                            if ($currentPageId == $block_page_id) {
                                $page_ids[] = $same_block->page_id;
                                break;
                            }
                        }
                    }
                }
            }
        } elseif (!empty($content)) {
            $page_ids = unserialize($content);
        }
        if (!empty($page_ids)) {
            foreach ($page_ids as $page_id) {
                $parsedPageId = Path::unParsePageId($page_id, false);
                $pages[$page_id] = new PageDetails($parsedPageId[0], !empty($parsedPageId[1]) ? $parsedPageId[1] : 0);
            }
        }

        return $this->_renderDisplayView($options, $pages);
    }
1304193
public function table($content, $options = array())
    {
        if ('text' == $this->getType()) {
            return $content;
        }

        if (false === $options) {
            return $this->config('templates.tableend');
        }

        $tag = 'table';
        if (is_null($content)) {
            $tag = 'tablestart';
        }

        $templater = $this->templater();
        return $templater->format('table', [
        'attrs' => $templater->formatAttributes($this->_mergeAttributes($options, $this->config('attributes.table'))),
        'content' => $content
        ]);
    }