Function __global->_lang_remap

Definitions

sources/lang3.php

  • Remap the specified 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)
$comcode boolean No No False N/A N/A Whether it is to be parsed as Comcode
$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)
$for_member ?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
$leave_source_user boolean No No False N/A N/A Whether to leave the source member as-is (as opposed to resetting it to the current member)

Returns

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

Preview

Code (PHP)

/**
 * Remap the specified 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  boolean $comcode Whether it is to be parsed as Comcode
 * @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 $for_member The member that owns the content this is for (null: current member)
 * @param  boolean $as_admin Whether to generate Comcode as arbitrary admin
 * @param  boolean $leave_source_user Whether to leave the source member as-is (as opposed to resetting it to the current member)
 * @return array The content language string save fields
 */

function _lang_remap(string $field_name, $lang_id, string $text, ?object $db = null, bool $comcode = false, ?string $pass_id = null, ?int $for_member = null, bool $as_admin = false, bool $leave_source_user = false) : array