Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Serializer.php

function Serializer::getSummaryAndDescriptionTextBlock

1 call to Serializer::getSummaryAndDescriptionTextBlock()
Serializer::getDocComment in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php
Generate a DocBlock comment.

File

vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php, line 124

Class

Serializer
Converts a DocBlock back from an object to a complete DocComment including Asterisks.

Namespace

phpDocumentor\Reflection\DocBlock

Code

private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength) : string {
    $text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription() : '');
    if ($wrapLength !== null) {
        $text = wordwrap($text, $wrapLength);
        return $text;
    }
    return $text;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal