Basic implementation and interface for tasks. More...
Public Member Functions | |
getId () | |
Get task identifier. | |
plainOutput () | |
Indicates whether the task itself will hand the full output page, including headers. | |
init (MessageGroup $group, array $options, array $nondefaults, IContextSource $context) | |
Constructor. | |
execute () | |
Executes the task with given options and outputs the results. | |
isAllowedFor (User $user) | |
Determine whether this user can use this task. | |
Static Public Member Functions | |
static | labelForTask ($id) |
Get label for task. | |
Protected Member Functions | |
output () | |
Outputs the results. | |
preinit () | |
Processes messages before paging is done. | |
postinit () | |
Processes messages after paging is done. | |
doPaging () | |
Takes a slice of messages according to limit and offset given in option at initialisation time. | |
Protected Attributes | |
$id = '__BUG__' | |
$group | |
$collection | |
$options | |
$nondefaults | |
$context | |
$offsets |
Basic implementation and interface for tasks.
Task is a combination of filters and output format that are applied to messages of given message group in given language.
Definition at line 17 of file TranslateTasks.php.
TranslateTask::doPaging | ( | ) | [protected] |
Takes a slice of messages according to limit and offset given in option at initialisation time.
Calls the callback to provide information how much messages there is.
Reimplemented in CustomFilteredMessagesTask, and ExportMessagesTask.
Definition at line 125 of file TranslateTasks.php.
Referenced by execute().
TranslateTask::execute | ( | ) | [final] |
Executes the task with given options and outputs the results.
Definition at line 112 of file TranslateTasks.php.
TranslateTask::getId | ( | ) |
Get task identifier.
Definition at line 35 of file TranslateTasks.php.
Referenced by ReviewMessagesTask::output(), and ViewMessagesTask::output().
TranslateTask::init | ( | MessageGroup $ | group, | |
array $ | options, | |||
array $ | nondefaults, | |||
IContextSource $ | context | |||
) | [final] |
Constructor.
MessageGroup | $group Message group. | |
array | $options Options. | |
array | $nondefaults List of non-default options for links. | |
IContextSource | $context |
Definition at line 86 of file TranslateTasks.php.
TranslateTask::isAllowedFor | ( | User $ | user | ) |
Determine whether this user can use this task.
Override this method if the task depends on user rights.
User | $user |
Reimplemented in AcceptQueueMessagesTask.
Definition at line 148 of file TranslateTasks.php.
static TranslateTask::labelForTask | ( | $ | id | ) | [static] |
Get label for task.
string | $id Task id |
Definition at line 27 of file TranslateTasks.php.
TranslateTask::output | ( | ) | [abstract, protected] |
Outputs the results.
Reimplemented in CustomFilteredMessagesTask, ViewMessagesTask, ReviewMessagesTask, ExportMessagesTask, ExportToFileMessagesTask, and ExportAsPoMessagesTask.
Referenced by execute().
TranslateTask::plainOutput | ( | ) |
Indicates whether the task itself will hand the full output page, including headers.
If false, the resulting html should be embedded to the page of calling context.
Reimplemented in ExportToFileMessagesTask, and ExportAsPoMessagesTask.
Definition at line 45 of file TranslateTasks.php.
TranslateTask::postinit | ( | ) | [abstract, protected] |
Processes messages after paging is done.
Reimplemented in CustomFilteredMessagesTask, and ViewMessagesTask.
Referenced by execute().
TranslateTask::preinit | ( | ) | [abstract, protected] |
Processes messages before paging is done.
Reimplemented in CustomFilteredMessagesTask, ViewMessagesTask, ReviewMessagesTask, ViewUntranslatedTask, ViewOptionalTask, ReviewAllMessagesTask, AcceptQueueMessagesTask, and ExportMessagesTask.
Referenced by execute().
TranslateTask::$collection [protected] |
Definition at line 57 of file TranslateTasks.php.
TranslateTask::$context [protected] |
Definition at line 72 of file TranslateTasks.php.
TranslateTask::$group [protected] |
Definition at line 52 of file TranslateTasks.php.
Referenced by ExportAsPoMessagesTask::output().
TranslateTask::$id = '__BUG__' [protected] |
Reimplemented in CustomFilteredMessagesTask, ViewMessagesTask, ReviewMessagesTask, ViewUntranslatedTask, ViewOptionalTask, ReviewAllMessagesTask, AcceptQueueMessagesTask, ExportMessagesTask, ExportToFileMessagesTask, and ExportAsPoMessagesTask.
Definition at line 19 of file TranslateTasks.php.
Referenced by labelForTask().
TranslateTask::$nondefaults [protected] |
Definition at line 67 of file TranslateTasks.php.
TranslateTask::$offsets [protected] |
Definition at line 77 of file TranslateTasks.php.
Referenced by doPaging().
TranslateTask::$options [protected] |
Definition at line 62 of file TranslateTasks.php.