\Horde_LoginTasks

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.

Summary

Methods
Properties
Constants
__construct()
shutdown()
runTasks()
displayTasks()
getLoginTasksUrl()
getLabels()
No public properties found
YEARLY
MONTHLY
WEEKLY
DAILY
EVERY
FIRST_LOGIN
ONCE
DISPLAY_CONFIRM_NO
DISPLAY_CONFIRM_YES
DISPLAY_AGREE
DISPLAY_NOTICE
DISPLAY_NONE
PRIORITY_HIGH
PRIORITY_NORMAL
_createTaskList()
$_tasklist
N/A
No private methods found
$_backend
N/A

Constants

YEARLY

YEARLY

MONTHLY

MONTHLY

WEEKLY

WEEKLY

DAILY

DAILY

EVERY

EVERY

FIRST_LOGIN

FIRST_LOGIN

ONCE

ONCE

DISPLAY_CONFIRM_NO

DISPLAY_CONFIRM_NO

DISPLAY_CONFIRM_YES

DISPLAY_CONFIRM_YES

DISPLAY_AGREE

DISPLAY_AGREE

DISPLAY_NOTICE

DISPLAY_NOTICE

DISPLAY_NONE

DISPLAY_NONE

PRIORITY_HIGH

PRIORITY_HIGH

PRIORITY_NORMAL

PRIORITY_NORMAL

Properties

$_tasklist

$_tasklist : \Horde_LoginTasks_Tasklist

The Horde_LoginTasks_Tasklist object for this login.

Type

\Horde_LoginTasks_Tasklist

$_backend

$_backend : \Horde_LoginTasks_Backend

The Horde_LoginTasks_Backend object provides all utilities we need for handling the login tasks.

Type

\Horde_LoginTasks_Backend

Methods

__construct()

__construct(\Horde_LoginTasks_Backend  $backend) 

Constructor.

Parameters

\Horde_LoginTasks_Backend $backend

The backend to use.

shutdown()

shutdown() 

Tasks to run on session shutdown.

runTasks()

runTasks(array  $opts = array()) : mixed

Do operations needed for this login.

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

array $opts

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.

Returns

mixed —

Null in case no redirection took place, the return value from the backend redirect() call otherwise.

displayTasks()

displayTasks() : array

Generate the list of tasks that need to be displayed.

This is the function called from the login tasks page every time it is loaded.

Returns

array —

The list of tasks that need to be displayed.

getLoginTasksUrl()

getLoginTasksUrl() : string

Generate the login tasks URL.

Returns

string —

The login tasks URL.

getLabels()

getLabels() : array

Labels for the class constants.

Returns

array —

A mapping of constant to gettext string.

_createTaskList()

_createTaskList() 

Creates the list of login tasks that are available for this session (stored in a Horde_LoginTasks_Tasklist object).