src/Charcoal/Cms/Mixin/Traits/HasContentBlocksTrait.php
private function metaDescFromAttachments()
    {
        $attachments = $this->getAttachments();

        if (!$attachments) {
            return null;
        }

        foreach ($attachments as $attachment) {
            if ($attachment->isText()) {
                $content = $attachment->description();

                $content = $this->ellipsis($content);

                return $content;
            }
        }

        return null;
    }
private function metaDescFromAttachments()
    {
        $attachments = $this->getAttachments();

        if (!$attachments) {
            return null;
        }

        foreach ($attachments as $attachment) {
            if ($attachment->isText()) {
                $content = $attachment->description();

                $content = $this->ellipsis($content);

                return $content;
            }
        }

        return null;
    }
private function metaDescFromAttachments ( ) { $ attachments = $ this -> getAttachments ( ) ; if ( ! $ attachments ) { return null ; } foreach ( $ attachments as $ attachment ) { if ( $ attachment -> isText ( ) ) { $ content = $ attachment -> description ( ) ; $ content = $ this -> ellipsis ( $ content ) ; return $ content ; } } return null ; }
Gets the content excerpt from attachments if a text attachment is found, otherwise
it return null.

@return Translation|null|string|\string[] The content from attachment
Gets the content excerpt from attachments if a text attachment is found otherwise it return null .