‪TYPO3CMS  9.5
TYPO3\CMS\SysAction\ActionTask Class Reference
Inheritance diagram for TYPO3\CMS\SysAction\ActionTask:
TYPO3\CMS\Taskcenter\TaskInterface

Public Member Functions

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

Protected Member Functions

array getActions ()
 
string renderActionList ()
 
string viewNewBackendUser ($record)
 
 deleteUser ($userId, $actionId)
 
mixed isCreatedByUser ($id, $action)
 
string getCreatedUsers ($action, $selectedUser)
 
string action_linkUserName ($username, $realName, $sysActionUid, $userId)
 
int saveNewBackendUser ($record, $vars)
 
string fixUsername ($username, $prefix)
 
array fixUserGroup ($appliedUsergroups, $actionRecord)
 
bool checkRootline ($pageId)
 
 action_createDir ($uid)
 
string action_getUserMainDir ()
 
string getUsergroups ($record, $vars)
 
 viewNewRecord ($record)
 
string viewEditRecord ($record)
 
string viewSqlQuery ($record)
 
string viewRecordList ($record)
 
 addMessage ($message, $title='', $severity=FlashMessage::OK)
 
string renderFlashMessages ()
 
TYPO3 CMS Core Localization LanguageService getLanguageService ()
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 

Protected Attributes

TYPO3 CMS Taskcenter Controller TaskModuleController $taskObject
 
array $hookObjects = array( )
 
string $moduleUrl
 
IconFactory $iconFactory
 

Detailed Description

This class provides a task for the taskcenter

Definition at line 37 of file ActionTask.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\SysAction\ActionTask::__construct ( \TYPO3\CMS\Taskcenter\Controller\TaskModuleController  $taskObject)

Constructor

Parameters
\TYPO3\CMS\Taskcenter\Controller\TaskModuleController$taskObject

Definition at line 63 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\SysAction\ActionTask\$taskObject, and TYPO3\CMS\SysAction\ActionTask\getLanguageService().

Member Function Documentation

◆ action_createDir()

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

Create a user directory if defined

Parameters
int$uid‪Id of the user record

Definition at line 675 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\action_getUserMainDir().

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

◆ action_getUserMainDir()

string 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 689 of file ActionTask.php.

References $GLOBALS.

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

◆ action_linkUserName()

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

Create a link to edit a user

Parameters
string$username‪Username
string$realName‪Real name of the user
int$sysActionUid‪Id of the sys_action record
int$userId‪Id of the user
Returns
‪string html link

Definition at line 526 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\getLanguageService(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ addMessage()

TYPO3\CMS\SysAction\ActionTask::addMessage (   $message,
  $title = '',
  $severity = FlashMessage::OK 
)
protected

◆ checkRootline()

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

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

Parameters
int$pageId‪Id of the the page to be checked
Returns
‪bool Access to the page

Definition at line 657 of file ActionTask.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), and TYPO3\CMS\SysAction\ActionTask\getBackendUser().

◆ deleteUser()

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

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

Parameters
int$userId‪Id of the BE user
int$actionId‪Id of the action

Definition at line 431 of file ActionTask.php.

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

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

◆ fixUserGroup()

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

Clean the to be applied usergroups from not allowed ones

Parameters
array$appliedUsergroups‪Array of to be applied user groups
array$actionRecord‪The action record
Returns
‪array Cleaned array

Definition at line 634 of file ActionTask.php.

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

◆ fixUsername()

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

Create the username based on the given username and the prefix

Parameters
string$username‪Username
string$prefix‪Prefix
Returns
‪string Combined username

Definition at line 618 of file ActionTask.php.

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

◆ getActions()

array 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 166 of file ActionTask.php.

References $GLOBALS, TYPO3\CMS\SysAction\ActionTask\getBackendUser(), TYPO3\CMS\SysAction\ActionTask\getLanguageService(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ getBackendUser()

TYPO3 CMS Core Authentication BackendUserAuthentication TYPO3\CMS\SysAction\ActionTask::getBackendUser ( )
protected

◆ getCreatedUsers()

string 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$action‪sys_action record.
int$selectedUser‪Id of a selected user
Returns
‪string html list of users

Definition at line 466 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\action_linkUserName(), TYPO3\CMS\SysAction\ActionTask\getLanguageService(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ getLanguageService()

◆ getOverview()

string 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 143 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\getActions(), and TYPO3\CMS\SysAction\ActionTask\getLanguageService().

◆ getTask()

◆ getUsergroups()

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

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

Parameters
array$record‪sys_action record
array$vars‪Selected be_user record
Returns
‪string Rendered user groups

Definition at line 705 of file ActionTask.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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

◆ isCreatedByUser()

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

Check if a BE user is created by the current user

Parameters
int$id‪Id of the BE user
array$action‪sys_action record.
Returns
‪mixed The record of the BE user if found, otherwise FALSE

Definition at line 450 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\getBackendUser(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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

◆ renderActionList()

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

◆ renderFlashMessages()

string TYPO3\CMS\SysAction\ActionTask::renderFlashMessages ( )
protected

◆ saveNewBackendUser()

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

◆ viewEditRecord()

◆ viewNewBackendUser()

◆ viewNewRecord()

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

Action to create a new record

Parameters
array$record‪sys_action record

Definition at line 729 of file ActionTask.php.

References TYPO3\CMS\SysAction\ActionTask\$moduleUrl, and TYPO3\CMS\Core\Utility\HttpUtility\redirect().

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

◆ viewRecordList()

◆ viewSqlQuery()

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

Member Data Documentation

◆ $hookObjects

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

All hook objects get registered here for later use

Definition at line 47 of file ActionTask.php.

◆ $iconFactory

IconFactory TYPO3\CMS\SysAction\ActionTask::$iconFactory
protected

Definition at line 57 of file ActionTask.php.

◆ $moduleUrl

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

URL to task module

Definition at line 53 of file ActionTask.php.

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

◆ $taskObject

TYPO3 CMS Taskcenter Controller TaskModuleController TYPO3\CMS\SysAction\ActionTask::$taskObject
protected

Definition at line 41 of file ActionTask.php.

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