auth()
Get the authenticated user
auth() : User|null
Get the authenticated user
auth() : User|null
Alias for auth()
user() : User|null
Get the authenticated user's ID
user_id() : int|null
Check if user is authenticated
is_logged_in() : bool
Check if user is a guest (not authenticated)
is_guest() : bool
Check if user is an admin
is_admin() : bool
Check if user is an editor
is_editor() : bool
Check if user is an author
is_author() : bool
Check if user has a specific role
has_role(string $role) : bool
Get the current CSRF token
csrf_token() : string
Generate a CSRF token hidden input field
csrf_field() : string
Get current user identifier for audit purposes
current_user_identifier() : string
Returns the authenticated CMS user's username if available (web context), otherwise returns the OS user running the process (CLI context).
User identifier (e.g., "admin" or "www-data" or "system")
Send a simple email
sendEmail(string $to, string $subject, string $body[, bool $isHtml = true ][, ISettingSource|null $settings = null ]) : bool
Recipient email address
Email subject
Email body content
Whether the body is HTML (default: true)
Optional settings source for email configuration
True if email was sent successfully
Send an email using a template
sendEmailTemplate(string $to, string $subject, string $template[, array<string|int, mixed> $data = [] ][, ISettingSource|null $settings = null ][, string $basePath = '' ]) : bool
Recipient email address
Email subject
Template path relative to resources/views
Data to pass to the template
Optional settings source for email configuration
Base path for template resolution (default: current directory)
True if email was sent successfully
Create a new email Sender instance with fluent interface
email([ISettingSource|null $settings = null ][, string $basePath = '' ]) : Sender
Optional settings source for email configuration
Base path for template resolution (default: current directory)
Generate a Gravatar URL for the given email address
gravatar_url(string $email[, int $size = 80 ][, string $default = 'mp' ]) : string
Email address
Image size in pixels (default: 80)
Default image type (mp, identicon, monsterid, wavatar, retro, robohash, blank)
Gravatar URL
Generate a complete Gravatar image tag
gravatar(string $email[, int $size = 80 ][, string $default = 'mp' ][, string $class = '' ]) : string
Email address
Image size in pixels (default: 80)
Default image type (mp, identicon, monsterid, wavatar, retro, robohash, blank)
Additional CSS classes to add to the img tag
Complete HTML img tag
Generate a relative URL path for a named route
route_path(string $routeName[, array<string, mixed> $parameters = [] ]) : string
The name of the route
Route parameters
Relative URL path
Generate an absolute URL for a named route
route_url(string $routeName[, array<string, mixed> $parameters = [] ]) : string
The name of the route
Route parameters
Absolute URL
Format a DateTimeImmutable object in the authenticated user's timezone
format_user_datetime(DateTimeImmutable|null $dateTime[, string $format = 'Y-m-d H:i' ]) : string
Converts a DateTime from UTC to the user's preferred timezone and formats it. Falls back to system timezone if no user is authenticated or user has no timezone set.
DateTime to format (assumed to be in UTC)
Date format string (default: 'Y-m-d H:i')
Formatted date/time string, or 'N/A' if dateTime is null
Format a DateTimeImmutable object as a date (no time) in the authenticated user's timezone
format_user_date(DateTimeImmutable|null $dateTime[, string $format = 'Y-m-d' ]) : string
Convenience wrapper around format_user_datetime for date-only display.
DateTime to format (assumed to be in UTC)
Date format string (default: 'Y-m-d')
Formatted date string, or 'N/A' if dateTime is null
Get a list of all available timezones grouped by region
get_timezones() : array<string, array<string|int, string>>
Returns an associative array with regions as keys and arrays of timezones as values. Useful for populating timezone dropdown selects.
Grouped timezones
Prepare timezones for select dropdown with selection state
group_timezones_for_select(array<int, string> $timezones[, string|null $currentTimezone = null ]) : array<string, array<string|int, array{value: string, label: string, selected: bool}>>
Groups timezones by region and returns a structured array ready for rendering in a select dropdown. Each timezone includes value, label, and selected state.
List of timezone identifiers
Currently selected timezone
Grouped timezones
Initialize the application.
boot(string $ConfigPath) : Scheduler|null
Run the application.
scheduler(Scheduler $App, array<string|int, mixed> $argv) : void
Dispatch a job to the queue for background processing
dispatch(IJob $job[, array<string|int, mixed> $args = [] ][, string|null $queue = null ][, int $delay = 0 ]) : string
Job instance to queue
Arguments to pass to the job
Queue name (null = default)
Delay in seconds before job is available
Job ID
Execute a job immediately (synchronously), bypassing the queue
dispatchNow(IJob $job[, array<string|int, mixed> $args = [] ]) : mixed
Useful for testing or when you want to ensure a job runs in the current process without queueing.
Job instance to execute
Arguments to pass to the job
Job result
Get the queue manager instance from registry
getQueueManager() : QueueManager
Creates a new instance if one doesn't exist.
Get the size of a queue
queueSize([string|null $queue = null ]) : int
Queue name (null = default)
Number of jobs in queue
Clear all jobs from a queue
clearQueue([string|null $queue = null ]) : int
Queue name (null = default)
Number of jobs cleared