Function Module_cms_news_cat->get_form_fields

Definitions

cms/pages/modules/cms_news.php

  • Get Tempcode for a news category adding/editing form.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$id ?AUTO_LINK No No Null N/A N/A The news category ID (null: new)
$title SHORT_TEXT No No Blank (empty string) N/A N/A The title of the news category
$img SHORT_TEXT No No Blank (empty string) N/A N/A The news category image
$notes LONG_TEXT No No Blank (empty string) N/A N/A Notes relating to the news category
$owner ?MEMBER No No Null N/A N/A The owner of the news category (null: public)
$category_id ?AUTO_LINK No No Null N/A N/A The ID of this news category (null: we haven't added it yet)

Returns

  • A pair: The input fields, Hidden fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get Tempcode for a news category adding/editing form.
 *
 * @param  ?AUTO_LINK $id The news category ID (null: new)
 * @param  SHORT_TEXT $title The title of the news category
 * @param  SHORT_TEXT $img The news category image
 * @param  LONG_TEXT $notes Notes relating to the news category
 * @param  ?MEMBER $owner The owner of the news category (null: public)
 * @param  ?AUTO_LINK $category_id The ID of this news category (null: we haven't added it yet)
 * @return array A pair: The input fields, Hidden fields
 */

public function get_form_fields(?int $id = null, string $title = '', string $img = '', string $notes = '', ?int $owner = null, ?int $category_id = null) : array