Function Module_cms_catalogues_alt->get_field_fields

Definitions

cms/pages/modules/cms_catalogues.php

  • Get Tempcode for a catalogue field adding/editing form (many of these are put together to add/edit a single catalogue!).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$catalogue_name ID_TEXT No No required parameter N/A N/A The catalogue being edited (blank: new and no name pre-specified)
$first_field boolean No No required parameter N/A N/A Whether this is the first field of the entry fields
$num_fields_to_show integer No No required parameter N/A N/A The number of fields that will be on the screen
$prefix string No No required parameter N/A N/A The prefix the field input fields are given (e.g. new1_)
$order integer No No required parameter N/A N/A The order of the field relative to the other fields
$name SHORT_TEXT No No Blank (empty string) N/A N/A The name of the field
$description LONG_TEXT No No Blank (empty string) N/A N/A Description for the field
$type ID_TEXT No No short_text N/A N/A The field type
$defines_order BINARY No No 0 N/A N/A Whether the field defines entry ordering
$visible BINARY No No 1 N/A N/A Whether the field is visible when an entry is viewed
$sensitive BINARY No No 0 N/A N/A Whether the field contains sensitive or personal data
$default SHORT_TEXT No No Blank (empty string) N/A N/A Default value for the field
$required BINARY No No 0 N/A N/A Whether the field is required
$is_sortable BINARY No No 0 N/A N/A Whether the field is sortable
$include_in_main_search BINARY No No 0 N/A N/A Whether the field is included in main search
$allow_template_search BINARY No No 0 N/A N/A Whether to allow template search
$put_in_category BINARY No No 1 N/A N/A Whether the field is to be shown in category views (not applicable for the list display type)
$put_in_search BINARY No No 1 N/A N/A Whether the field is to be shown in search views (not applicable for the list display type)
$options SHORT_TEXT No No Blank (empty string) N/A N/A Field options

Returns

  • A pair: the Tempcode for the visible fields, and the Tempcode for the hidden fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get Tempcode for a catalogue field adding/editing form (many of these are put together to add/edit a single catalogue!).
 *
 * @param  ID_TEXT $catalogue_name The catalogue being edited (blank: new and no name pre-specified)
 * @param  boolean $first_field Whether this is the first field of the entry fields
 * @param  integer $num_fields_to_show The number of fields that will be on the screen
 * @param  string $prefix The prefix the field input fields are given (e.g. new1_)
 * @param  integer $order The order of the field relative to the other fields
 * @param  SHORT_TEXT $name The name of the field
 * @param  LONG_TEXT $description Description for the field
 * @param  ID_TEXT $type The field type
 * @param  BINARY $defines_order Whether the field defines entry ordering
 * @param  BINARY $visible Whether the field is visible when an entry is viewed
 * @param  BINARY $sensitive Whether the field contains sensitive or personal data
 * @param  SHORT_TEXT $default Default value for the field
 * @param  BINARY $required Whether the field is required
 * @param  BINARY $is_sortable Whether the field is sortable
 * @param  BINARY $include_in_main_search Whether the field is included in main search
 * @param  BINARY $allow_template_search Whether to allow template search
 * @param  BINARY $put_in_category Whether the field is to be shown in category views (not applicable for the list display type)
 * @param  BINARY $put_in_search Whether the field is to be shown in search views (not applicable for the list display type)
 * @param  SHORT_TEXT $options Field options
 * @return array A pair: the Tempcode for the visible fields, and the Tempcode for the hidden fields
 */

public function get_field_fields(string $catalogue_name, bool $first_field, int $num_fields_to_show, string $prefix, int $order, string $name = '', string $description = '', string $type = 'short_text', int $defines_order = 0, int $visible = 1, int $sensitive = 0, string $default = '', int $required = 0, int $is_sortable = 0, int $include_in_main_search = 0, int $allow_template_search = 0, int $put_in_category = 1, int $put_in_search = 1, string $options = '') : array