DeleteText
in package
Use case for deleting texts.
Handles deletion of both active and archived texts including cleanup of related data (sentences, text items, tags).
Tags
Table of Contents
Methods
- deleteArchivedText() : array{count: int}
- Delete an archived text.
- deleteArchivedTexts() : array{count: int}
- Delete multiple archived texts.
- deleteMultiple() : array{count: int}
- Delete multiple active texts.
- execute() : array{texts: int, sentences: int, textItems: int}
- Delete an active text.
- cleanupTextTags() : void
- Clean up orphaned text tags.
Methods
deleteArchivedText()
Delete an archived text.
public
deleteArchivedText(int $textId) : array{count: int}
Parameters
- $textId : int
-
Archived text ID
Return values
array{count: int} —Count of deleted texts
deleteArchivedTexts()
Delete multiple archived texts.
public
deleteArchivedTexts(array<string|int, mixed> $textIds) : array{count: int}
Parameters
- $textIds : array<string|int, mixed>
-
Array of archived text IDs
Return values
array{count: int} —Count of deleted texts
deleteMultiple()
Delete multiple active texts.
public
deleteMultiple(array<string|int, mixed> $textIds) : array{count: int}
Parameters
- $textIds : array<string|int, mixed>
-
Array of text IDs
Return values
array{count: int} —Count of deleted texts
execute()
Delete an active text.
public
execute(int $textId) : array{texts: int, sentences: int, textItems: int}
Parameters
- $textId : int
-
Text ID
Return values
array{texts: int, sentences: int, textItems: int} —Counts of deleted items
cleanupTextTags()
Clean up orphaned text tags.
private
cleanupTextTags() : void