Function __global->_selectcode_to_generic_callback

Definitions

sources/selectcode.php

  • Function to do an actual data lookup sourced via the database, used as a kind of a callback function (it's name gets passed into the generic API).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table_name ?string No No required parameter N/A N/A The database's table for the record-set we're matching (null: use a different lookup method)
$field_name ?string No No required parameter N/A N/A The database's ID field for the record-set we're matching (null: use a different lookup method)
$category_field_name ?string No No required parameter N/A N/A The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
$has_no_parents boolean No No required parameter N/A N/A Whether there are parents in the filter
$db ?object No No required parameter N/A N/A Database connector to use (null: website)

Returns

  • A list of ID numbers
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Function to do an actual data lookup sourced via the database, used as a kind of a callback function (it's name gets passed into the generic API).
 *
 * @param  ?string $table_name The database's table for the record-set we're matching (null: use a different lookup method)
 * @param  ?string $field_name The database's ID field for the record-set we're matching (null: use a different lookup method)
 * @param  ?string $category_field_name The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
 * @param  boolean $has_no_parents Whether there are parents in the filter
 * @param  ?object $db Database connector to use (null: website)
 * @return array A list of ID numbers
 */

function _selectcode_to_generic_callback(?string $table_name, ?string $field_name, ?string $category_field_name, bool $has_no_parents, ?object $db) : array