Documentation

DeleteLanguage

Use case for deleting a language with dependency checking.

Tags
since
3.0.0

Table of Contents

Methods

canDelete()  : bool
Check if a language can be deleted (no related data).
deleteById()  : bool
Delete a language by ID (API-friendly version).
execute()  : array{success: bool, count: int, error: ?string}
Delete a language.
getRelatedDataCounts()  : array{texts: int, archivedTexts: int, words: int, feeds: int}
Get counts of related data for a language.

Methods

canDelete()

Check if a language can be deleted (no related data).

public canDelete(int $id) : bool
Parameters
$id : int

Language ID

Return values
bool

deleteById()

Delete a language by ID (API-friendly version).

public deleteById(int $id) : bool
Parameters
$id : int

Language ID

Return values
bool

True if deleted

execute()

Delete a language.

public execute(int $id) : array{success: bool, count: int, error: ?string}
Parameters
$id : int

Language ID

Return values
array{success: bool, count: int, error: ?string}

getRelatedDataCounts()

Get counts of related data for a language.

public getRelatedDataCounts(int $id) : array{texts: int, archivedTexts: int, words: int, feeds: int}
Parameters
$id : int

Language ID

Return values
array{texts: int, archivedTexts: int, words: int, feeds: int}

        
On this page

Search results