Horde_LoginTasks_Task
in package
Abstract class to allow for modularization of specific login tasks.
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
- $active : bool
- Should the task be run?
- $display : int
- The style of the page output.
- $interval : int
- The interval at which to run the task.
- $priority : int
- The priority of the task.
- describe() : string
- Return description information for the login task.
- execute() : mixed
- Do login task (if it has been confirmed).
- joinDisplayWith() : bool
- Indicates if the display of the current task should be joined with the given previous task.
- needsDisplay() : bool
- Does the task need to be displayed?
- _isConfirmTask() : bool
- Is this a confirmation task?
Properties
$active
Should the task be run?
public
bool
$active
= \true
$display
The style of the page output.
public
int
$display
= \Horde_LoginTasks::DISPLAY_CONFIRM_YES
[1] Horde_LoginTasks::DISPLAY_CONFIRM_NO Horde_LoginTasks::DISPLAY_CONFIRM_YES Each output from describe() will have a checkbox associated with it. For each checkbox selected, execute() for that task will be run. More than 1 confirmation message can be displayed on the confirmation page at once.
DISPLAY_CONFIRM_YES will be checked by default, DISPLAY_CONFIRM_NO
will be unchecked by default.
[2] Horde_LoginTasks::DISPLAY_AGREE The output from describe() should be text asking the user to agree/disagree to specified terms. If 'yes' is selected, the POST variable 'agree' will be set. If 'no' is selected, the POST variable 'not_agree' will be set. In either case, execute() will ALWAYS be run. This style will be displayed on its own confirmation page.
[3] Horde_LoginTasks::DISPLAY_NOTICE The output from describe() should be any non-interactive text desired. There will be a single 'Click to Continue' button below this text. execute() will ALWAYS be run. This style will be displayed on its own confirmation page.
[4] Horde_LoginTasks::DISPLAY_NONE Don't display any confirmation to the user.
$interval
The interval at which to run the task.
public
int
$interval
= \Horde_LoginTasks::MONTHLY
$priority
The priority of the task.
public
int
$priority
= \Horde_LoginTasks::PRIORITY_NORMAL
Methods
describe()
Return description information for the login task.
public
describe() : string
Return values
string —Description that will be displayed on the login task confirmation page.
execute()
Do login task (if it has been confirmed).
public
abstract execute() : mixed
Return values
mixed —joinDisplayWith()
Indicates if the display of the current task should be joined with the given previous task.
public
joinDisplayWith(Horde_Login_Task $previous) : bool
Parameters
- $previous : Horde_Login_Task
-
The previous task to display.
Return values
bool —True if both tasks should be displayed together.
needsDisplay()
Does the task need to be displayed?
public
needsDisplay() : bool
Return values
bool —True if the task should be displayed.
_isConfirmTask()
Is this a confirmation task?
private
_isConfirmTask(Horde_Login_Task $task) : bool
Parameters
- $task : Horde_Login_Task
-
The task to analyze.
Return values
bool —True if this is a confirmation task.