Function __global->cns_get_all_custom_fields_match

Definitions

sources/cns_members.php

  • Gets all the system custom fields that match certain parameters.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$groups ?array No No Null N/A N/A That are applicable only to one of the usergroups in this list (empty: CPFs with no restriction) (null: disregard restriction)
$public_view ?BINARY No No Null N/A N/A That are publicly viewable (null: don't care)
$owner_view ?BINARY No No Null N/A N/A That are owner viewable (null: don't care)
$owner_set ?BINARY No No Null N/A N/A That are owner settable (null: don't care)
$required ?BINARY No No Null N/A N/A That are required (null: don't care)
$show_in_posts ?BINARY No No Null N/A N/A That are to be shown in posts (null: don't care)
$show_in_post_previews ?BINARY No No Null N/A N/A That are to be shown in post previews (null: don't care)
$special_start ?BINARY No No Null N/A N/A That start 'cms_' (null: don't care)
$show_on_join_form ?boolean No No Null N/A N/A That are to go on the join form (null: don't care)
$adjusted_config_options array No No [] N/A N/A A map of adjusted config options; actually it is field_<id>=0|1 for the purposes of this function, and overrides cf_show_on_join_form

Returns

  • A list of rows of such fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Gets all the system custom fields that match certain parameters.
 *
 * @param  ?array $groups That are applicable only to one of the usergroups in this list (empty: CPFs with no restriction) (null: disregard restriction)
 * @param  ?BINARY $public_view That are publicly viewable (null: don't care)
 * @param  ?BINARY $owner_view That are owner viewable (null: don't care)
 * @param  ?BINARY $owner_set That are owner settable (null: don't care)
 * @param  ?BINARY $required That are required (null: don't care)
 * @param  ?BINARY $show_in_posts That are to be shown in posts (null: don't care)
 * @param  ?BINARY $show_in_post_previews That are to be shown in post previews (null: don't care)
 * @param  ?BINARY $special_start That start 'cms_' (null: don't care)
 * @param  ?boolean $show_on_join_form That are to go on the join form (null: don't care)
 * @param  array $adjusted_config_options A map of adjusted config options; actually it is field_<id>=0|1 for the purposes of this function, and overrides cf_show_on_join_form
 * @return array A list of rows of such fields
 */

function cns_get_all_custom_fields_match(?array $groups = null, ?int $public_view = null, ?int $owner_view = null, ?int $owner_set = null, ?int $required = null, ?int $show_in_posts = null, ?int $show_in_post_previews = null, ?int $special_start = null, ?bool $show_on_join_form = null, array $adjusted_config_options = []) : array