TranslateTask Class Reference

Basic implementation and interface for tasks. More...

Inheritance diagram for TranslateTask:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Member Function Documentation

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.

Returns:
string Partial or full html.
See also:
plainOutput()

Definition at line 112 of file TranslateTasks.php.

Here is the call graph for this function:

TranslateTask::getId (  ) 

Get task identifier.

Returns:
string

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.

Parameters:
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.

Parameters:
User $user
Returns:
string

Reimplemented in AcceptQueueMessagesTask.

Definition at line 148 of file TranslateTasks.php.

static TranslateTask::labelForTask ( id  )  [static]

Get label for task.

Parameters:
string $id Task id
Returns:
string

Definition at line 27 of file TranslateTasks.php.

TranslateTask::output (  )  [abstract, protected]
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.

Returns:
bool

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]

Member Data Documentation

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]
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.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:56 2013 for MediaWiki Translate Extension by  doxygen 1.6.3