Answers the appropriate summary of the given content field.

@param DBHTMLText $content

@return string
188521
public function getContentSummary(DBHTMLText $content)
    {
        switch ($this->owner->SummaryMode) {
            case self::SUMMARY_FIRST_SENTENCE:
                return $content->FirstSentence();
            case self::SUMMARY_FIRST_PARAGRAPH:
                return $content->FirstParagraph();
            default:
                return StringTools::singleton()->getContentSummary($content);
        }
    }
875955
protected function renderElement($content = null)
    {
        // Get element parts
        $element    = $this->getElement();
        $attributes = $this->getAttributesAsString();

        // Create html
        $html = '<' . $element;
        if ($attributes) {
            $html .= $attributes;
        }

        // Create closing tag
        if (is_string($content)) {
            $html .= '>' . $content . '</' . $element;
        }
        $html .= $this->getClosingBracket();

        return $html;
    }
598406
public function render($content)
    {
        $element = $this->getElement();
        $view    = $element->getView();
        if (null === $view) {
            return $content;
        }

        $tooltip = $element->getAttrib('tooltip');
        $tooltip = trim($tooltip);
        //$element->removeAttrib('tooltip');

        if (empty($tooltip)) {
            return $content;
        }

        $view->headScript()->appendFile(\Zend_Controller_Front::getInstance()->getBaseUrl()  .  '/gems/js/jquery.cluetip.js');
        $view->headLink()->appendStylesheet(\Zend_Controller_Front::getInstance()->getBaseUrl()  . '/gems/js/jquery.cluetip.css');
        $script = "$('" . $this->getTag() . ".tooltip').cluetip({
            activation: 'click',
            sticky: 'true',
            closeText: '[X]',
            closePosition:    'title',
            width: 450,
            titleAttribute: 'tip',
            splitTitle: '|'})
                   $('#tabContainer').bind( 'tabsselect', function(event, ui) {
  $(document).trigger('hideCluetip');
});";

        $view->jQuery()->addOnLoad($script);

        $separator = $this->getSeparator();
        $placement = $this->getPlacement();
        $class     = $this->getClass();
        $tag       = $this->getTag();
        $escape    = $this->getEscape();

        $options   = $this->getOptions();

        if ($escape) {
            $tooltip = $view->escape($tooltip);
        }

        $options['tag'] = $tag;
        $options['tip'] = str_replace('"', '\"', $tooltip);
        $decorator = new \Zend_Form_Decorator_HtmlTag($options);
        $tooltip = $decorator->render($this->getImg()) . $decorator->setOptions(array('class'=>'thetooltip', 'id'=>'tooltip-' . $this->getElement()->getAttrib('id')))->render($tooltip);

        switch ($placement) {
            case self::PREPEND:
                return $tooltip . $separator . $content;
            case self::APPEND:
            default:
                return $content . $separator . $tooltip;
        }

        /* Misschien later toch toevoegen */
        $helper = $this->getHelper();

        return $view->$helper($id, $content, $attribs);
    }
1183243
protected function toMarkdown($content)
    {
        $tmpfname = tempnam(sys_get_temp_dir(), 'fillet'); // good
        file_put_contents($tmpfname, $content);
        $cmd = $this->config['pandoc']['bin'] . ' --no-wrap -f html -t markdown ' . $tmpfname;
        $content = shell_exec($cmd);
        unlink($tmpfname);
        return $content;
    }
41603
protected function getHtml( $content )
	{
		$site = Route::input( 'site', Input::get( 'site', 'default' ) );
		return View::make( 'shop::jqadm.index', array( 'content' => $content, 'site' => $site ) );
	}
1031922
public function markdown($content)
    {
        // Parse the field as Markdown, return HTML
        $output = $this->markdown->text($content);

        $config = $this->config->get('general/htmlcleaner');
        $allowedTags = !empty($config['allowed_tags']) ? $config['allowed_tags'] :
            ['div', 'p', 'br', 'hr', 's', 'u', 'strong', 'em', 'i', 'b', 'li', 'ul', 'ol', 'blockquote', 'pre', 'code', 'tt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'dd', 'dl', 'dh', 'table', 'tbody', 'thead', 'tfoot', 'th', 'td', 'tr', 'a', 'img'];
        $allowedAttributes = !empty($config['allowed_attributes']) ? $config['allowed_attributes'] :
            ['id', 'class', 'name', 'value', 'href', 'src'];

        // Sanitize/clean the HTML.
        $maid = new Maid(
            [
                'output-format'   => 'html',
                'allowed-tags'    => $allowedTags,
                'allowed-attribs' => $allowedAttributes,
            ]
        );
        $output = $maid->clean($output);

        return $output;
    }
602774
public static function table(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("table", $content, $attributes);
    }
1248738
protected function preProcessPostContent( $content ) {
		$content = apply_filters( 'the_content', $content );
		$content = str_ireplace( [ '<b></b>', '<i></i>', '<strong></strong>', '<em></em>' ], '', $content );
		$content = $this->fixAnnoyingCharacters( $content );
		$content = $this->tidy( $content );

		return $content;
	}
1034841
public function humanAverageReadingTime($content)
    {
        if (empty($content)) {
            return '';
        }
        $content = StringHelper::stripHtml($content);
        $seconds = $this->averageReadingTime($content);

        return Craft::$app->formatter->asDuration($seconds);
    }
292917
protected function maybeRender($content)
    {
        if ($content instanceof ViewModel) {
            $content = $this->getView()->render($content);
        }

        return (string) $content;
    }
1372290
public function getSummaryText()
    {
        if ($this->Summary) {
            return $this->dbObject('Summary');
        }
        
        if ($this->hasLinkPage()) {
            return $this->LinkPage()->MetaSummary;
        }
    }
915328
public static function encodeHtml($content)
    {
        $content = self::unicodeToShortcode($content);
        $content = self::shortcodeToEntities($content);

        return $content;
    }
254833
public function parseNoTemplate($content) {
        $this->_content = $content;
        $this->_parseDebugStart();
        $this->_parseExtend();
        $this->_parseInclude();
        $this->_parsePath();
        $this->_parseGravatar();
        $this->_parseAsset();
        $this->_parseUrl();
        $this->_parsePhp();
        $this->_parseLang();
        $this->_parseForeach();
        $this->_parseFor();
        $this->_parseVar();
        $this->_parseVarFunc();
        $this->_parseCondition();
        $this->_parseFunction();
        $this->_parseException();
        $this->_parseMinify();
        $this->_parseDebugEnd();

        return $this->_content;
    }
168794
public static function tr(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("tr", $content, $attributes);
    }
1274326
protected function bbCodesHandle($content) {
		return preg_replace_callback('~\[([a-z]+)\](.*?)\[/\1\]~', function($match) use($bbCodes) {
			array_shift($match);
			list($tag, $value) = $match;
			
			if (preg_match('~\[[a-z]+\]~', $value)) {
				$value = $this->bbCodesHandle($value);
			}
			
			if ($tag === 'keyword') {
				return $this->color($value, 'cyan');
			}
			
			if ($tag === 'alert') {
				return $this->color($value, 'red');
			}
			
			if ($tag === 'success') {
				return $this->color($value, 'green');
			}
			
			if ($tag === 'warning') {
				return $this->color($value, 'yellow');
			}
			
			if ($tag === 'info') {
				return $this->color($value, 'blue');
			}
			
			return $value;
		}, $content);
	}
551431
public function parseContent($content)
    {
        $cto = $this->getContentTypeObject();
        if (!empty($cto)) {
            return $cto->parseContent($content);
        } else {
            return $content;
        }
    }
1087233
public function getLayout(& $content)
    {
        //$res = preg_match("/\<\!-- php__layout\((.+)\) --\>/", $str, $match);
        $res = preg_match("/\{layout\s+(.+)\}/", $content, $match);
        if ($res) {
            return str_replace(array('"', '\'', '.html'), '', $match[1]);
        }
        return null;
    }