bundle/Templating/Twig/Runtime/EzPublishRuntime.php
public function getContentName($contentId): string
    {
        try {
            $versionInfo = $this->loadVersionInfo($contentId);

            return $versionInfo->getName() ?? '';
        } catch (Throwable $t) {
            return '';
        }
    }
public function getContentName($contentId): string
    {
        try {
            $versionInfo = $this->loadVersionInfo($contentId);

            return $versionInfo->getName() ?? '';
        } catch (Throwable $t) {
            return '';
        }
    }
public function getContentName ( $ contentId ) : string { try { $ versionInfo = $ this -> loadVersionInfo ( $ contentId ) ; return $ versionInfo -> getName ( ) ?? '' ; } catch ( Throwable $ t ) { return '' ; } }
Returns the content name.

@param int|string $contentId

@return string
Returns the content name .