Function __global->render_download_box

Definitions

sources/downloads.php

  • Get Tempcode for a download 'feature box' for the given row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$row array No No required parameter N/A N/A The database field row of this download
$pic boolean No No True N/A N/A Whether to show a picture
$include_breadcrumbs boolean No No True N/A N/A Whether to show breadcrumbs
$zone ?ID_TEXT No No Null N/A N/A The zone the download module we're using is in (null: find it)
$text_summary ?Tempcode No No Null N/A N/A Text summary for result (e.g. highlighted portion of actual file from search result) (null: none)
$give_context boolean No No True N/A N/A Whether to include context (i.e. say WHAT this is, not just show the actual content)
$root ?AUTO_LINK No No Null N/A N/A The virtual root (null: read from environment)
$guid ID_TEXT No No Blank (empty string) N/A N/A Overridden GUID to send to templates (blank: none)

Returns

  • A box for this download, linking to the full download page
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get Tempcode for a download 'feature box' for the given row.
 *
 * @param  array $row The database field row of this download
 * @param  boolean $pic Whether to show a picture
 * @param  boolean $include_breadcrumbs Whether to show breadcrumbs
 * @param  ?ID_TEXT $zone The zone the download module we're using is in (null: find it)
 * @param  ?Tempcode $text_summary Text summary for result (e.g. highlighted portion of actual file from search result) (null: none)
 * @param  boolean $give_context Whether to include context (i.e. say WHAT this is, not just show the actual content)
 * @param  ?AUTO_LINK $root The virtual root (null: read from environment)
 * @param  ID_TEXT $guid Overridden GUID to send to templates (blank: none)
 * @return Tempcode A box for this download, linking to the full download page
 */

function render_download_box(array $row, bool $pic = true, bool $include_breadcrumbs = true, ?string $zone = null, ?object $text_summary = null, bool $give_context = true, ?int $root = null, string $guid = '') : object