‪TYPO3CMS  ‪main
TYPO3\CMS\Belog\Controller\BackendLogController Class Reference
Inheritance diagram for TYPO3\CMS\Belog\Controller\BackendLogController:
TYPO3\CMS\Extbase\Mvc\Controller\ActionController TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface

Public Member Functions

 __construct (protected readonly ModuleTemplateFactory $moduleTemplateFactory, protected readonly LogEntryRepository $logEntryRepository, protected readonly ConnectionPool $connectionPool,)
 
 initializeListAction ()
 
 listAction (Constraint $constraint=null, string $operation='')
 
 deleteMessageAction (int $errorUid)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 injectResponseFactory (ResponseFactoryInterface $responseFactory)
 
 injectStreamFactory (StreamFactoryInterface $streamFactory)
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectPropertyMapper (PropertyMapper $propertyMapper)
 
 injectInternalFlashMessageService (FlashMessageService $flashMessageService)
 
 injectInternalExtensionService (ExtensionService $extensionService)
 
 initializeControllerArgumentsBaseValidators ()
 
 processRequest (RequestInterface $request)
 
 addFlashMessage (string $messageBody, string $messageTitle='', ContextualFeedbackSeverity $severity=ContextualFeedbackSeverity::OK, bool $storeInSession=true)
 
 throwStatus (int $statusCode, string $statusMessage='', ?string $content=null)
 

Protected Member Functions

 getConstraintFromBeUserData ()
 
 persistConstraintInBeUserData (Constraint $constraint)
 
 resetConstraintsOnMemoryExhaustionError ()
 
 groupLogEntriesDay (array $logEntries)
 
array createUserAndGroupListForSelectOptions ()
 
 createSelectableNumberOfLogEntriesOptions ()
 
array createWorkspaceListForSelectOptions ()
 
 forceWorkspaceSelectionIfInWorkspace (Constraint $constraint)
 
array createPageDepthOptions ()
 
 setStartAndEndTimeFromTimeSelector (Constraint $constraint)
 
 getBackendUser ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest (RequestInterface $request)
 
 resolveActionMethodName ()
 
 callActionMethod (RequestInterface $request)
 
 resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
 errorAction ()
 
 addErrorFlashMessage ()
 
 getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
 getFlattenedValidationErrorMessage ()
 
 getFlashMessageQueue (string $identifier=null)
 
 redirect (?string $actionName, ?string $controllerName=null, ?string $extensionName=null, ?array $arguments=null, ?int $pageUid=null, $_=null, int $statusCode=303)
 
 redirectToUri (string|UriInterface $uri, $_=null, int $statusCode=303)
 
 addBaseUriIfNecessary (string $uri)
 
 mapRequestArgumentsToControllerArguments ()
 
 htmlResponse (string $html=null)
 
 jsonResponse (string $json=null)
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
ResponseFactoryInterface $responseFactory
 
StreamFactoryInterface $streamFactory
 
HashService $hashService
 
ReflectionService $reflectionService
 
ViewInterface $view
 
string $defaultViewObjectName = TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
RequestInterface $request
 
UriBuilder $uriBuilder
 
array $settings
 
ValidatorResolver $validatorResolver
 
Arguments $arguments
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

Show log entries from sys_log

This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.

Definition at line 40 of file BackendLogController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Belog\Controller\BackendLogController::__construct ( protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
protected readonly LogEntryRepository  $logEntryRepository,
protected readonly ConnectionPool  $connectionPool 
)

Definition at line 42 of file BackendLogController.php.

Member Function Documentation

◆ createPageDepthOptions()

array TYPO3\CMS\Belog\Controller\BackendLogController::createPageDepthOptions ( )
protected

Create options for the 'depth of page levels' selector.

Returns
‪array Key is depth identifier (1 = One level), value the localized select option label

Definition at line 304 of file BackendLogController.php.

References TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ createSelectableNumberOfLogEntriesOptions()

TYPO3\CMS\Belog\Controller\BackendLogController::createSelectableNumberOfLogEntriesOptions ( )
protected

◆ createUserAndGroupListForSelectOptions()

array TYPO3\CMS\Belog\Controller\BackendLogController::createUserAndGroupListForSelectOptions ( )
protected

Create options for the user / group drop down. This is not moved to a repository by intention to not mix up this 'meta' data with real repository work.

Returns
‪array Key is the option name, value its label

Definition at line 223 of file BackendLogController.php.

References TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ createWorkspaceListForSelectOptions()

array TYPO3\CMS\Belog\Controller\BackendLogController::createWorkspaceListForSelectOptions ( )
protected

Create options for the workspace selector

Returns
‪array Key is uid of workspace, value its label

Definition at line 262 of file BackendLogController.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ deleteMessageAction()

TYPO3\CMS\Belog\Controller\BackendLogController::deleteMessageAction ( int  $errorUid)

Delete all log entries that share the same message with the log entry given in $errorUid

Definition at line 131 of file BackendLogController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirect(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

◆ forceWorkspaceSelectionIfInWorkspace()

TYPO3\CMS\Belog\Controller\BackendLogController::forceWorkspaceSelectionIfInWorkspace ( Constraint  $constraint)
protected

If the user is in a workspace different than LIVE, we force to show only log entries from the selected workspace, and the workspace selector is not shown.

Definition at line 286 of file BackendLogController.php.

References TYPO3\CMS\Belog\Controller\BackendLogController\getBackendUser(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Belog\Domain\Model\Constraint\setWorkspaceUid().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ getBackendUser()

◆ getConstraintFromBeUserData()

TYPO3\CMS\Belog\Controller\BackendLogController::getConstraintFromBeUserData ( )
protected

Get module states (the constraint object) from user data

Definition at line 146 of file BackendLogController.php.

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ groupLogEntriesDay()

TYPO3\CMS\Belog\Controller\BackendLogController::groupLogEntriesDay ( array  $logEntries)
protected

Create a sorted array for day from the query result of the sys log repository.

pid is always -1 to render a flat list. '12345' is a sub array to split entries by day, number is first second of day

[pid][dayTimestamp][items]

Parameters
array<LogEntry>‪$logEntries

Definition at line 194 of file BackendLogController.php.

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ initializeListAction()

TYPO3\CMS\Belog\Controller\BackendLogController::initializeListAction ( )

Initialize list action

Definition at line 51 of file BackendLogController.php.

References $GLOBALS.

◆ listAction()

◆ persistConstraintInBeUserData()

TYPO3\CMS\Belog\Controller\BackendLogController::persistConstraintInBeUserData ( Constraint  $constraint)
protected

◆ resetConstraintsOnMemoryExhaustionError()

TYPO3\CMS\Belog\Controller\BackendLogController::resetConstraintsOnMemoryExhaustionError ( )
protected

In case the script execution fails, because the user requested too many results (memory exhaustion in php), reset the constraints in be user settings, so the belog can be accessed again in the next call.

Definition at line 171 of file BackendLogController.php.

References TYPO3\CMS\Belog\Controller\BackendLogController\persistConstraintInBeUserData().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\listAction().

◆ setStartAndEndTimeFromTimeSelector()