Function Hook_CMA->get_image_url

Definitions

sources/content.php

  • Get content image URL for a content row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$row array No No required parameter N/A N/A The database row for the content
$fallback_method integer No No 0 N/A N/A Whether to provide a default image if there is no real image, a IMAGE_URL_FALLBACK_* constant
&$has_fallen_back boolean Yes No False N/A N/A Returned by reference, set if the image returned is a fallback image

Returns

  • Image URL (blank: none)
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get content image URL for a content row.
 *
 * @param  array $row The database row for the content
 * @param  integer $fallback_method Whether to provide a default image if there is no real image, a IMAGE_URL_FALLBACK_* constant
 * @param  boolean $has_fallen_back Returned by reference, set if the image returned is a fallback image
 * @return URLPATH Image URL (blank: none)
 */

public function get_image_url(array $row, int $fallback_method = 0, bool &$has_fallen_back = false) : string