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

Breadcrumb

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

function ComponentMetadata::getThumbnailPath

Gets the thumbnail path.

Return value

string The path.

File

core/lib/Drupal/Core/Theme/Component/ComponentMetadata.php, line 176

Class

ComponentMetadata
Component metadata.

Namespace

Drupal\Core\Theme\Component

Code

public function getThumbnailPath() : string {
    if (!isset($this->thumbnailPath)) {
        $thumbnail_path = sprintf('%s/thumbnail.png', $this->path);
        $this->thumbnailPath = file_exists($thumbnail_path) ? $thumbnail_path : '';
    }
    return $this->thumbnailPath;
}

API Navigation

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