Function __global->delete_comcode_attachments

Definitions

sources/attachments3.php

  • Deletes all the attachments a given content language string holds. Well, not quite! It deletes all references, and any attachments have through it, run out of references.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$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)
$force boolean No No False N/A N/A Whether to force this, regardless of config

Preview

Code (PHP)

/**
 * Deletes all the attachments a given content language string holds. Well, not quite! It deletes all references, and any attachments have through it, run out of references.
 *
 * @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  boolean $force Whether to force this, regardless of config
 */

function delete_comcode_attachments(string $type, string $id, ?object $db = null, bool $force = false)