Function __global->_search_img_file

Definitions

sources/themes.php

  • Search for a specified image file within a theme for a specified language.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$theme ID_TEXT No No required parameter N/A N/A The theme
$lang ?LANGUAGE_NAME No No required parameter N/A N/A The language (null: try generally, under no specific language)
$id ID_TEXT No No required parameter N/A N/A The theme image ID
$dir ID_TEXT No No images N/A N/A Directory to search

Returns

  • The URL to the image (null: was not found)
  • Type: ?URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Search for a specified image file within a theme for a specified language.
 *
 * @param  ID_TEXT $theme The theme
 * @param  ?LANGUAGE_NAME $lang The language (null: try generally, under no specific language)
 * @param  ID_TEXT $id The theme image ID
 * @param  ID_TEXT $dir Directory to search
 * @return ?URLPATH The URL to the image (null: was not found)
 */

function _search_img_file(string $theme, ?string $lang, string $id, string $dir = 'images') : ?string