Documentation

HomeFacade

Facade providing unified interface to Home module.

Tags
since
3.0.0

Table of Contents

Properties

$getDashboardData  : GetDashboardData
$getTextStatistics  : GetTextStatistics

Methods

__construct()  : mixed
Constructor.
getCurrentLanguageId()  : int|null
Get the current language ID from settings.
getCurrentTextId()  : int|null
Get the current text ID from settings.
getDashboardData()  : array{language_count: int, current_language_id: int|null, current_language_text_count: int, current_text_id: int|null, current_text_info: array|null, is_wordpress: bool, is_multi_user: bool}
Get dashboard data for the home page.
getDatabaseSize()  : float
Get database size in MB for the current table set.
getLanguageCount()  : int
Get the count of languages in the database.
getLanguageName()  : string
Get language name by ID.
getLastTextInfo()  : array<string|int, mixed>|null
Get current text info with statistics for Alpine.js display.

Properties

Methods

__construct()

Constructor.

public __construct() : mixed

getCurrentLanguageId()

Get the current language ID from settings.

public getCurrentLanguageId() : int|null
Return values
int|null

Current language ID or null if not set

getCurrentTextId()

Get the current text ID from settings.

public getCurrentTextId() : int|null
Return values
int|null

Current text ID or null if not set

getDashboardData()

Get dashboard data for the home page.

public getDashboardData() : array{language_count: int, current_language_id: int|null, current_language_text_count: int, current_text_id: int|null, current_text_info: array|null, is_wordpress: bool, is_multi_user: bool}
Return values
array{language_count: int, current_language_id: int|null, current_language_text_count: int, current_text_id: int|null, current_text_info: array|null, is_wordpress: bool, is_multi_user: bool}

getDatabaseSize()

Get database size in MB for the current table set.

public getDatabaseSize() : float
Return values
float

Database size in MB

getLanguageCount()

Get the count of languages in the database.

public getLanguageCount() : int
Return values
int

Number of languages

getLanguageName()

Get language name by ID.

public getLanguageName(int $languageId) : string
Parameters
$languageId : int

Language ID

Return values
string

Language name or empty string if not found

getLastTextInfo()

Get current text info with statistics for Alpine.js display.

public getLastTextInfo(int|null $textId, array<string|int, mixed>|null $textInfo) : array<string|int, mixed>|null
Parameters
$textId : int|null

Current text ID

$textInfo : array<string|int, mixed>|null

Text info from dashboard data

Return values
array<string|int, mixed>|null

Text info with statistics, or null


        
On this page

Search results