Function __global->_fields_api_filtercode

Definitions

sources/filtercode.php

  • Find field by checking fields API, by field ID.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$db object No No required parameter N/A N/A Database connector
$info array No No required parameter N/A N/A Content type info
$catalogue_name ?ID_TEXT No No required parameter N/A N/A Name of the catalogue (null: unknown; reduces performance)
&$extra_join array Yes No required parameter N/A N/A List of joins (passed as reference)
$filter_key ID_TEXT No No required parameter N/A N/A The field to get
$filter_val string No No required parameter N/A N/A The field value for this
$db_fields array No No required parameter N/A N/A Database field data
$table_join_code string No No required parameter N/A N/A What the database will join the table with

Returns

  • A triple: Proper database field name to access with, The fields API table type (blank: no special table), The new filter value (null: error)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find field by checking fields API, by field ID.
 *
 * @param  object $db Database connector
 * @param  array $info Content type info
 * @param  ?ID_TEXT $catalogue_name Name of the catalogue (null: unknown; reduces performance)
 * @param  array $extra_join List of joins (passed as reference)
 * @param  ID_TEXT $filter_key The field to get
 * @param  string $filter_val The field value for this
 * @param  array $db_fields Database field data
 * @param  string $table_join_code What the database will join the table with
 * @return ?array A triple: Proper database field name to access with, The fields API table type (blank: no special table), The new filter value (null: error)
 */

function _fields_api_filtercode(object $db, array $info, ?string $catalogue_name, array &$extra_join, string $filter_key, string $filter_val, array $db_fields, string $table_join_code) : ?array