TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\SysAction\ActionTask Class Reference
Inheritance diagram for TYPO3\CMS\SysAction\ActionTask:
TYPO3\CMS\Taskcenter\TaskInterface tx_sysaction_task

Public Member Functions

 __construct (\TYPO3\CMS\Taskcenter\Controller\TaskModuleController $taskObject)
 
 getTask ()
 
 getOverview ()
 

Public Attributes

 $t3lib_TCEforms
 

Protected Member Functions

 getActions ()
 
 renderActionList ()
 
 viewNewBackendUser ($record)
 
 deleteUser ($userId, $actionId)
 
 isCreatedByUser ($id, $action)
 
 getCreatedUsers ($action, $selectedUser)
 
 action_linkUserName ($username, $realName, $sysActionUid, $userId)
 
 saveNewBackendUser ($record, $vars)
 
 fixUsername ($username, $prefix)
 
 fixUserGroup ($appliedUsergroups, $actionRecord)
 
 fixDbMount ($appliedDbMounts)
 
 checkRootline ($pageId)
 
 JScode ()
 
 action_createDir ($uid)
 
 action_getUserMainDir ()
 
 getUsergroups ($record, $vars)
 
 viewNewRecord ($record)
 
 viewEditRecord ($record)
 
 viewSqlQuery ($record)
 
 viewRecordList ($record)
 

Protected Attributes

 $taskObject
 
 $hookObjects = array()
 
 $moduleUrl
 

Detailed Description

This class provides a task for the taskcenter

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om
Georg Ringer typo3.nosp@m.@rin.nosp@m.gerge.nosp@m..org

Definition at line 26 of file ActionTask.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ action_createDir()

TYPO3\CMS\SysAction\ActionTask::action_createDir (   $uid)
protected

Create a user directory if defined

Parameters
integer$uidId of the user record
Returns
void

Definition at line 583 of file ActionTask.php.

References $uid, TYPO3\CMS\SysAction\ActionTask\action_getUserMainDir(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir().

Referenced by TYPO3\CMS\SysAction\ActionTask\saveNewBackendUser().

◆ action_getUserMainDir()

TYPO3\CMS\SysAction\ActionTask::action_getUserMainDir ( )
protected

Get the path to the user home directory which is set in the localconf.php

Returns
string Path

Definition at line 596 of file ActionTask.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\isFirstPartOfStr().

Referenced by TYPO3\CMS\SysAction\ActionTask\action_createDir().

◆ action_linkUserName()

TYPO3\CMS\SysAction\ActionTask::action_linkUserName (   $username,
  $realName,
  $sysActionUid,
  $userId 
)
protected

Create a link to edit a user

Parameters
string$usernameUsername
string$realNameReal name of the user
integer$sysActionUidId of the sys_action record
integer$userIdId of the user
Returns
string html link

Definition at line 397 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIcon(), and TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

Referenced by TYPO3\CMS\SysAction\ActionTask\getCreatedUsers().

◆ checkRootline()

TYPO3\CMS\SysAction\ActionTask::checkRootline (   $pageId)
protected

Check if a page is inside the rootline the current user can see

Parameters
integer$pageIdId of the the page to be checked
Returns
boolean Access to the page

Definition at line 552 of file ActionTask.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine().

Referenced by TYPO3\CMS\SysAction\ActionTask\fixDbMount().

◆ deleteUser()

TYPO3\CMS\SysAction\ActionTask::deleteUser (   $userId,
  $actionId 
)
protected

Delete a BE user and redirect to the action by its id

Parameters
integer$userIdId of the BE user
integer$actionIdId of the action
Returns
void

Definition at line 332 of file ActionTask.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\HttpUtility\redirect().

Referenced by TYPO3\CMS\SysAction\ActionTask\viewNewBackendUser().

◆ fixDbMount()

TYPO3\CMS\SysAction\ActionTask::fixDbMount (   $appliedDbMounts)
protected

Clean the to be applied DB-Mounts from not allowed ones

Parameters
string$appliedDbMountsList of pages like pages_123,pages456
Returns
string Cleaned list

Definition at line 526 of file ActionTask.php.

References $GLOBALS, $uid, TYPO3\CMS\SysAction\ActionTask\checkRootline(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\SysAction\ActionTask\saveNewBackendUser().

◆ fixUserGroup()

TYPO3\CMS\SysAction\ActionTask::fixUserGroup (   $appliedUsergroups,
  $actionRecord 
)
protected

Clean the to be applied usergroups from not allowed ones

Parameters
array$appliedUsergroupsArray of to be applied user groups
array$actionRecordThe action record
Returns
array Cleaned array

Definition at line 504 of file ActionTask.php.

Referenced by TYPO3\CMS\SysAction\ActionTask\saveNewBackendUser().

◆ fixUsername()

TYPO3\CMS\SysAction\ActionTask::fixUsername (   $username,
  $prefix 
)
protected

Create the username based on the given username and the prefix

Parameters
string$usernameUsername
string$prefixPrefix
Returns
string Combined username

Definition at line 493 of file ActionTask.php.

Referenced by TYPO3\CMS\SysAction\ActionTask\saveNewBackendUser().

◆ getActions()

TYPO3\CMS\SysAction\ActionTask::getActions ( )
protected

Get all actions of an user. Admins can see any action, all others only those which are allowed in sys_action record itself.

Returns
array Array holding every needed information of a sys_action

Definition at line 153 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Backend\Utility\IconUtility\skinImg().

Referenced by TYPO3\CMS\SysAction\ActionTask\getOverview(), and TYPO3\CMS\SysAction\ActionTask\renderActionList().

◆ getCreatedUsers()

TYPO3\CMS\SysAction\ActionTask::getCreatedUsers (   $action,
  $selectedUser 
)
protected

Render all users who are created by the current BE user including a link to edit the record

Parameters
array$actionsys_action record.
integer$selectedUserId of a selected user
Returns
string html list of users

Definition at line 365 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\SysAction\ActionTask\action_linkUserName(), TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), and TYPO3\CMS\Backend\Utility\IconUtility\getSpriteIconForRecord().

Referenced by TYPO3\CMS\SysAction\ActionTask\viewNewBackendUser().

◆ getOverview()

TYPO3\CMS\SysAction\ActionTask::getOverview ( )

General overview over the task in the taskcenter menu

Returns
string Overview as HTML

Implements TYPO3\CMS\Taskcenter\TaskInterface.

Definition at line 129 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), and TYPO3\CMS\SysAction\ActionTask\getActions().

◆ getTask()

◆ getUsergroups()

TYPO3\CMS\SysAction\ActionTask::getUsergroups (   $record,
  $vars 
)
protected

Get all allowed usergroups which can be applied to a user record

Parameters
array$recordsys_action record
array$varsSelected be_user record
Returns
string Rendered user groups

Definition at line 611 of file ActionTask.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\SysAction\ActionTask\viewNewBackendUser().

◆ isCreatedByUser()

TYPO3\CMS\SysAction\ActionTask::isCreatedByUser (   $id,
  $action 
)
protected

Check if a BE user is created by the current user

Parameters
integer$idId of the BE user
array$actionsys_action record.
Returns
mixed The record of the BE user if found, otherwise FALSE

Definition at line 349 of file ActionTask.php.

References $GLOBALS.

Referenced by TYPO3\CMS\SysAction\ActionTask\viewNewBackendUser().

◆ JScode()

TYPO3\CMS\SysAction\ActionTask::JScode ( )
protected

Add additional JavaScript to use the tceform select box

Returns
void

Definition at line 569 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Backend\Form\FormEngine\dbFileCon(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\SysAction\ActionTask\viewNewBackendUser().

◆ renderActionList()

TYPO3\CMS\SysAction\ActionTask::renderActionList ( )
protected

◆ saveNewBackendUser()

TYPO3\CMS\SysAction\ActionTask::saveNewBackendUser (   $record,
  $vars 
)
protected

◆ viewEditRecord()

TYPO3\CMS\SysAction\ActionTask::viewEditRecord (   $record)
protected

◆ viewNewBackendUser()

◆ viewNewRecord()

TYPO3\CMS\SysAction\ActionTask::viewNewRecord (   $record)
protected

Action to create a new record

Parameters
array$recordsys_action record
Returns
void Redirect to form to create a record

Definition at line 635 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Core\Utility\HttpUtility\redirect().

Referenced by TYPO3\CMS\SysAction\ActionTask\getTask().

◆ viewRecordList()

TYPO3\CMS\SysAction\ActionTask::viewRecordList (   $record)
protected

◆ viewSqlQuery()

TYPO3\CMS\SysAction\ActionTask::viewSqlQuery (   $record)
protected

Action to view the result of a SQL query

Parameters
array$recordsys_action record
Returns
string Result of the query

Definition at line 683 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\Backend\Utility\BackendUtility\getModuleUrl(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Backend\Utility\IconUtility\skinImg().

Referenced by TYPO3\CMS\SysAction\ActionTask\getTask().

Member Data Documentation

◆ $hookObjects

TYPO3\CMS\SysAction\ActionTask::$hookObjects = array()
protected

Definition at line 44 of file ActionTask.php.

◆ $moduleUrl

TYPO3\CMS\SysAction\ActionTask::$moduleUrl
protected

Definition at line 51 of file ActionTask.php.

◆ $t3lib_TCEforms

TYPO3\CMS\SysAction\ActionTask::$t3lib_TCEforms

Definition at line 37 of file ActionTask.php.

◆ $taskObject

TYPO3\CMS\SysAction\ActionTask::$taskObject
protected

Definition at line 31 of file ActionTask.php.

Referenced by TYPO3\CMS\SysAction\ActionTask\__construct().