Function __global->get_award_fields

Definitions

sources/awards.php

  • Get all the award selection fields for a content type and content ID.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type mixed No No required parameter N/A N/A The content type (array or string)
$id ?ID_TEXT No No Null N/A N/A The content ID (null: not added yet - therefore can't be holding the award yet)

Returns

  • The fields
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get all the award selection fields for a content type and content ID.
 *
 * @param  mixed $content_type The content type (array or string)
 * @param  ?ID_TEXT $id The content ID (null: not added yet - therefore can't be holding the award yet)
 * @return Tempcode The fields
 */

function get_award_fields($content_type, ?string $id = null) : object