Function __global->lang_remap_comcode

Definitions

sources/lang.php

  • Remap the specified Comcode content language string, and return details of the content language string.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$field_name ID_TEXT No No required parameter N/A N/A The field name
$lang_id mixed No No required parameter N/A N/A The ID (if multi-lang-content on), or the string itself (if multi-lang-content off)
$text string No No required parameter N/A N/A The text to remap to
$db ?object No No Null N/A N/A The database connector to use (null: standard site connector)
$pass_id ?string No No Null N/A N/A The special identifier for this content language string on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
$source_user ?MEMBER No No Null N/A N/A The member that owns the content this is for (null: current member)
$as_admin boolean No No False N/A N/A Whether to generate Comcode as arbitrary admin

Returns

  • The content language string save fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Remap the specified Comcode content language string, and return details of the content language string.
 *
 * @param  ID_TEXT $field_name The field name
 * @param  mixed $lang_id The ID (if multi-lang-content on), or the string itself (if multi-lang-content off)
 * @param  string $text The text to remap to
 * @param  ?object $db The database connector to use (null: standard site connector)
 * @param  ?string $pass_id The special identifier for this content language string on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
 * @param  ?MEMBER $source_user The member that owns the content this is for (null: current member)
 * @param  boolean $as_admin Whether to generate Comcode as arbitrary admin
 * @return array The content language string save fields
 */

function lang_remap_comcode(string $field_name, $lang_id, string $text, ?object $db = null, ?string $pass_id = null, ?int $source_user = null, bool $as_admin = false) : array