You are here

public function SampleDataLoader::getThemeFile in YAML Content 8.2

Helper function for theme images.

Parameters

string $file_path: The destination filename.

string $file_src: The uri to the theme file in the format 'directory/image.jpg'.

Return value

\Drupal\file\FileInterface|false A file entity, or FALSE on error.

File

modules/sample_data/src/SampleDataLoader.php, line 190

Class

SampleDataLoader
Provides methods for retrieving sample data to be used in demo content.

Namespace

Drupal\sample_data

Code

public function getThemeFile($file_path, $file_src) {
  return static::getFile($file_path, drupal_get_path('theme', $this->srcTheme) . '/' . $file_src);
}