Horde_LoginTasks
in package
The Horde_LoginTasks:: class provides a set of methods for dealing with login tasks to run upon login to Horde applications.
Copyright 2001-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- DAILY = 4
- DISPLAY_AGREE = 3
- DISPLAY_CONFIRM_NO = 1
- DISPLAY_CONFIRM_YES = 2
- DISPLAY_NONE = 5
- DISPLAY_NOTICE = 4
- EVERY = 5
- FIRST_LOGIN = 6
- MONTHLY = 2
- ONCE = 7
- PRIORITY_HIGH = 1
- PRIORITY_NORMAL = 2
- WEEKLY = 3
- YEARLY = 1
- $_tasklist : Horde_LoginTasks_Tasklist
- The Horde_LoginTasks_Tasklist object for this login.
- $_backend : Horde_LoginTasks_Backend
- The Horde_LoginTasks_Backend object provides all utilities we need for handling the login tasks.
- __construct() : mixed
- Constructor.
- displayTasks() : array<string|int, mixed>
- Generate the list of tasks that need to be displayed.
- getLabels() : array<string|int, mixed>
- Labels for the class constants.
- getLoginTasksUrl() : string
- Generate the login tasks URL.
- runTasks() : mixed
- Do operations needed for this login.
- shutdown() : mixed
- Tasks to run on session shutdown.
- _createTaskList() : mixed
- Creates the list of login tasks that are available for this session (stored in a Horde_LoginTasks_Tasklist object).
Constants
DAILY
public
mixed
DAILY
= 4
DISPLAY_AGREE
public
mixed
DISPLAY_AGREE
= 3
DISPLAY_CONFIRM_NO
public
mixed
DISPLAY_CONFIRM_NO
= 1
DISPLAY_CONFIRM_YES
public
mixed
DISPLAY_CONFIRM_YES
= 2
DISPLAY_NONE
public
mixed
DISPLAY_NONE
= 5
DISPLAY_NOTICE
public
mixed
DISPLAY_NOTICE
= 4
EVERY
public
mixed
EVERY
= 5
FIRST_LOGIN
public
mixed
FIRST_LOGIN
= 6
MONTHLY
public
mixed
MONTHLY
= 2
ONCE
public
mixed
ONCE
= 7
PRIORITY_HIGH
public
mixed
PRIORITY_HIGH
= 1
PRIORITY_NORMAL
public
mixed
PRIORITY_NORMAL
= 2
WEEKLY
public
mixed
WEEKLY
= 3
YEARLY
public
mixed
YEARLY
= 1
Properties
$_tasklist
The Horde_LoginTasks_Tasklist object for this login.
protected
Horde_LoginTasks_Tasklist
$_tasklist
$_backend
The Horde_LoginTasks_Backend object provides all utilities we need for handling the login tasks.
private
Horde_LoginTasks_Backend
$_backend
Methods
__construct()
Constructor.
public
__construct(Horde_LoginTasks_Backend $backend) : mixed
Parameters
- $backend : Horde_LoginTasks_Backend
-
The backend to use.
Return values
mixed —displayTasks()
Generate the list of tasks that need to be displayed.
public
displayTasks() : array<string|int, mixed>
This is the function called from the login tasks page every time it is loaded.
Return values
array<string|int, mixed> —The list of tasks that need to be displayed.
getLabels()
Labels for the class constants.
public
static getLabels() : array<string|int, mixed>
Return values
array<string|int, mixed> —A mapping of constant to gettext string.
getLoginTasksUrl()
Generate the login tasks URL.
public
getLoginTasksUrl() : string
Return values
string —The login tasks URL.
runTasks()
Do operations needed for this login.
public
runTasks([array<string|int, mixed> $opts = array() ]) : mixed
This function will generate the list of tasks to perform during this login and will redirect to the login tasks page if necessary. This is the function that should be called from the application upon login.
Parameters
- $opts : array<string|int, mixed> = array()
-
Options:
- confirmed: (array) The list of confirmed tasks.
- url: (string) The URL to redirect to when finished.
- user_confirmed: (boolean) If true, indicates that any pending actions have been confirmed by the user.
Return values
mixed —Null in case no redirection took place, the return value from the backend redirect() call otherwise.
shutdown()
Tasks to run on session shutdown.
public
shutdown() : mixed
Return values
mixed —_createTaskList()
Creates the list of login tasks that are available for this session (stored in a Horde_LoginTasks_Tasklist object).
protected
_createTaskList() : mixed