Function Hook_ecommerce_permission->_get_fields

Definitions

sources/hooks/systems/ecommerce/permission.php

  • Get fields for adding/editing one of these.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$name_suffix string No No Blank (empty string) N/A N/A What to place onto the end of the field name
$title SHORT_TEXT No No Blank (empty string) N/A N/A Title
$description LONG_TEXT No No Blank (empty string) N/A N/A Description
$enabled BINARY No No 1 N/A N/A Whether it is enabled
$price ?REAL No No 0 N/A N/A The price (null: not set)
$tax_code ID_TEXT No No 0% N/A N/A The tax code
$price_points ?integer No No Null N/A N/A The price in points (null: not set)
$hours ?integer No No Null N/A N/A Number of hours for it to last for (null: unlimited)
$type ID_TEXT No No member_privileges member_privileges member_category_access member_page_access member_zone_access N/A Permission scope 'type'
$privilege ID_TEXT No No Blank (empty string) N/A N/A Permission scope 'privilege'
$zone ID_TEXT No No Blank (empty string) N/A N/A Permission scope 'zone'
$page ID_TEXT No No Blank (empty string) N/A N/A Permission scope 'page'
$module ID_TEXT No No Blank (empty string) N/A N/A Permission scope 'module'
$category ID_TEXT No No Blank (empty string) N/A N/A Permission scope 'category'
$mail_subject SHORT_TEXT No No Blank (empty string) N/A N/A Confirmation mail subject
$mail_body LONG_TEXT No No Blank (empty string) N/A N/A Confirmation mail body

Returns

  • The fields
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get fields for adding/editing one of these.
 *
 * @param  string $name_suffix What to place onto the end of the field name
 * @param  SHORT_TEXT $title Title
 * @param  LONG_TEXT $description Description
 * @param  BINARY $enabled Whether it is enabled
 * @param  ?REAL $price The price (null: not set)
 * @param  ID_TEXT $tax_code The tax code
 * @param  ?integer $price_points The price in points (null: not set)
 * @param  ?integer $hours Number of hours for it to last for (null: unlimited)
 * @param  ID_TEXT $type Permission scope 'type'
 * @set member_privileges member_category_access member_page_access member_zone_access
 * @param  ID_TEXT $privilege Permission scope 'privilege'
 * @param  ID_TEXT $zone Permission scope 'zone'
 * @param  ID_TEXT $page Permission scope 'page'
 * @param  ID_TEXT $module Permission scope 'module'
 * @param  ID_TEXT $category Permission scope 'category'
 * @param  SHORT_TEXT $mail_subject Confirmation mail subject
 * @param  LONG_TEXT $mail_body Confirmation mail body
 * @return Tempcode The fields
 */

protected function _get_fields(string $name_suffix = '', string $title = '', string $description = '', int $enabled = 1, ?float $price = 0, string $tax_code = '0%', ?int $price_points = null, ?int $hours = null, string $type = 'member_privileges', string $privilege = '', string $zone = '', string $page = '', string $module = '', string $category = '', string $mail_subject = '', string $mail_body = '') : object