Function __global->update_lang_comcode_attachments

Definitions

sources/attachments3.php

  • Update a content language string, in such a way that new attachments are created if they were specified.
  • 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 content language string
$text LONG_TEXT No No required parameter N/A N/A The new text
$type ID_TEXT No No required parameter N/A N/A The arbitrary type that the attached is for (e.g. download)
$id ID_TEXT No No required parameter N/A N/A The ID in the set of the arbitrary types that the attached is for
$db ?object No No Null N/A N/A The database connector to use (null: standard site connector)
$for_member ?MEMBER No No Null N/A N/A The member that owns the content this is for (null: current member)

Returns

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

Preview

Code (PHP)

/**
 * Update a content language string, in such a way that new attachments are created if they were specified.
 *
 * @param  ID_TEXT $field_name The field name
 * @param  mixed $lang_id The content language string
 * @param  LONG_TEXT $text The new text
 * @param  ID_TEXT $type The arbitrary type that the attached is for (e.g. download)
 * @param  ID_TEXT $id The ID in the set of the arbitrary types that the attached is for
 * @param  ?object $db The database connector to use (null: standard site connector)
 * @param  ?MEMBER $for_member The member that owns the content this is for (null: current member)
 * @return array The content language string save fields
 */

function update_lang_comcode_attachments(string $field_name, $lang_id, string $text, string $type, string $id, ?object $db = null, ?int $for_member = null) : array