Function DatabaseConnector->promote_text_field_to_comcode

Definitions

sources/database.php

  • If a text field has picked up Comcode support, we will need to run this.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table_name ID_TEXT No No required parameter N/A N/A The table name
$name ID_TEXT No No required parameter N/A N/A The field name
$key ID_TEXT No No id N/A N/A The tables key field name
$level integer No No 2 1 2 3 4 N/A The translation level to use
$in_assembly boolean No No False N/A N/A Whether our data is already stored in Tempcode assembly format
$long_trans boolean No No False N/A N/A Whether this should be a LONG_TRANS__COMCODE field, not a SHORT_TRANS__COMCODE field

Preview

Code (PHP)

/**
 * If a text field has picked up Comcode support, we will need to run this.
 *
 * @param  ID_TEXT $table_name The table name
 * @param  ID_TEXT $name The field name
 * @param  ID_TEXT $key The tables key field name
 * @param  integer $level The translation level to use
 * @set 1 2 3 4
 * @param  boolean $in_assembly Whether our data is already stored in Tempcode assembly format
 * @param  boolean $long_trans Whether this should be a LONG_TRANS__COMCODE field, not a SHORT_TRANS__COMCODE field
 */

public function promote_text_field_to_comcode(string $table_name, string $name, string $key = 'id', int $level = 2, bool $in_assembly = false, bool $long_trans = false)