Generates description from the first paragraph of the `Content` attribute.

@return string|null
555123
public function GenerateDescriptionFromContent()
    {
        // check for content
        if ($content = trim($this->owner->Content)) {
            // pillage first paragraph from page content
            if (preg_match('/<p>(.*?)<\/p>/i', $content, $match)) {
                // is HTML
                $content = $match[0];
            } else {
                // is plain text
                $content = explode(PHP_EOL, $content);
                $content = $content[0];
            }
            // decode (no harm done) & return
            return trim(html_entity_decode(strip_tags($content)));
        } else {
            return null;
        }
    }
1057855
protected function renderContent() {     
        
        return '
            <tr>
                <td class="descriptionbox wrap width33">' .
                I18N::translate('Enable Piwik Statistics') .
                // Ideally, would like to add helpLink, but this does not work for modules...
                // FunctionsPrint::helpLink('piwik_enabled', $this->getName());
                '</td>
                <td class="optionbox">' .
                FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) .
                '</td>
            </tr>' .
            
            '<tr>
                <td class="descriptionbox wrap width33">' .
                I18N::translate('Piwik URL') .
                '</td>
                <td class="optionbox">
                    <input type="text" name="piwik_url" size="45" value="' . 
                    $this->data->get('piwik_url', '') . '" />
                </td>
            </tr>' .
            
            '<tr>
                <td class="descriptionbox wrap width33">' .
                    I18N::translate('Piwik Token') .
                '</td>
                <td class="optionbox">
                    <input type="text" name="piwik_token" size="45" value="' . 
                    $this->data->get('piwik_token', '') . '" />
                </td>
            </tr>' .
            
            '<tr>
                <td class="descriptionbox wrap width33">' .
                    I18N::translate('Piwik Site ID') .
                '</td>
                <td class="optionbox">
                    <input type="text" name="piwik_siteid" size="4" value="' . 
                    $this->data->get('piwik_siteid', '') . '" />
                </td>
            </tr>' ;
        
    }
40382
public function getParsedDescription()
    {
        if (null === $this->parsedDescription) {
            $description = new Description($this->description, $this->docblock);
            $this->parsedDescription = $description->getParsedContents();
        }
        return $this->parsedDescription;
    }
741112
protected function getContent()
    {
        $dom = new DOMDocument('1.0');
        $dom->loadXML($this->string);
        $dom->preserveWhiteSpace = false;
        $dom->formatOutput = true;

        return $dom->saveXML();
    }
460946
public function getTitleAttribute()
    {
        $data = unserialize($this->attributes['data']);

        return $data === false ? null : (isset($data['title']) ? $data['title'] : null);
    }
67610
public function fcontents() {
        if ($this->contents === null) {
            $cl = $this->contents_lazy;
            $this->contents = $cl();
        }
        return $this->contents;
    }
198573
function title( $contentObjectAttribute, $value = null )
    {
        $text = eZXMLTextType::rawXMLText( $contentObjectAttribute );

        $dom = new DOMDocument( '1.0', 'utf-8' );
        $success = $dom->loadXML( $text );

        // Get first text element of xml
        if ( !$success )
        {
            return $text;
        }

        $root = $dom->documentElement;
        $section = $root->firstChild;
        $textDom = false;
        if ( $section )
        {
            $textDom = $section->firstChild;
        }

        if ( $textDom && $textDom->hasChildNodes() )
        {
            $text = $textDom->firstChild->textContent;
        }
        elseif ( $textDom )
        {
            $text = $textDom->textContent;
        }

        return $text;
    }
138821
public function get_formatted_description() {
        if (!isset($this->definition->description)) {
            return '';
        }
        return format_text($this->definition->description, $this->definition->descriptionformat);
    }
327237
public function getCaptionHTML()
    {
        if ($this->CaptionMode == self::CAPTION_TEXT && $this->Caption) {
            return $this->Caption;
        }
        
        if ($this->CaptionMode == self::CAPTION_DESC && $this->Description) {
            return sprintf('<p>%s</p>', $this->Description);
        }
    }
1216042
private function get_Text()
    {
        $text_formatting = array('b','strong','em','i','small','strong','sub','sup','ins','del','mark','br','hr');

        foreach ($this->dom_element->childNodes as $node)
        {
            if($node->nodeType == 3)
            {
                $this->set_text(trim($node->textContent));
                $this->textFormatting.=$node->textContent;
            }
            else if($node->nodeType == 1 && !!in_array($node->tagName, $text_formatting))
            {
                if(!!in_array($node->tagName, ['br','hr']))
                {
                    $this->textFormatting.= sprintf('<%s>',$node->tagName);
                }
                else
                {
                    $tag = $node->tagName;
                    $attrs = $this->attrs_to_string($node->attributes);
                    $text = $node->textContent;

                    $this->textFormatting.= sprintf('<%1$s%2$s>%3$s</%1$s>',$tag,$attrs,$text);
                }
            }
        }

        return $this;
    }
354387
public function getContentId() {
		if (!$this->id) {
			throw new Exception("Null content identifier; content must be written before retrieving id");
		}
		return $this->getSourceIdentifier() . ContentService::SEPARATOR . $this->id;
	}
6773
def paragraph(self, content):
        
        if not self._out.description:
            self._out.description = content
        return ' '
1146461
public function getDescription()
    {
        $descriptionSections = array();

        foreach ($this->getCommentSections() as $commentSection) {
            // Anything that is not the section comment or modifiers comment
            // must be the description comment
            if ($commentSection != $this->getReferenceComment()
                && $commentSection != $this->getTitleComment()
                && $commentSection != $this->getMarkupComment()
                && $commentSection != $this->getDeprecatedComment()
                && $commentSection != $this->getExperimentalComment()
                && $commentSection != $this->getCompatibilityComment()
                && $commentSection != $this->getModifiersComment()
                && $commentSection != $this->getParametersComment()
            ) {
                $descriptionSections[] = $commentSection;
            }
        }

        return implode("\n\n", $descriptionSections);
    }
1263351
public function getDescription()
    {
        if (is_string($this->str_description)) {
            $description = new S($this->str_description);

            return $description->wrap(OptionItem::getWidth());
        } else {
            return null;
        }
    }
80436
public function description() {
		$output = null;
		if ( ! empty( $this->struct['description'] ) ) {
			$output .= ' <small>' . esc_html( $this->struct['description'] ) . '</small>';
		}

		return $output;
	}
190930
public function getContent()
    {
        $contentAttribute = $this->contentAttribute;
        if ($contentAttribute === false) {
            return null;
        }
        if (is_array($contentAttribute)) {
            $content = [];
            foreach ($contentAttribute as $key => $value) {
                $content[$key] = $this->$value;
            }
            return $content;
        }
        return $this->$contentAttribute;
    }
617789
public function getContent() : string
    {
        return $this->escape ? helpers\e($this->content) : $this->content;
    }