classname
stringlengths 2
79
⌀ | method_name
stringlengths 3
5.05k
| description
stringlengths 6
3.95k
| method_code
stringlengths 7
8.51k
⌀ | explanation
stringclasses 1
value |
---|---|---|---|---|
DisplayListmanagerCellEvent | isHeader | * @var bool | return $this->isHeader; | - |
DisplayListmanagerCellEvent | getAttributes | * @var array | return $this->attributes; | - |
DisplayListmanagerCellEvent | setAttributes | * @var string | $this->attributes = $attributes; | - |
DisplayListmanagerCellEvent | getOnclickEvent | * @var array | return $this->onclickEvent; | - |
DisplayListmanagerCellEvent | setOnclickEvent | * @var string | $this->onclickEvent = $onclickEvent; | - |
DisplayListmanagerCellEvent | getCssClasses | * @param \TGroupTableField $tableCell
* @param array $rowData
* @param bool $isHeader | return $this->cssClasses; | - |
DisplayListmanagerCellEvent | setCssClasses | * @return \TGroupTableField | $this->cssClasses = $cssClasses; | - |
DisplayListmanagerCellEvent | getCellValue | * @return array | return $this->cellValue; | - |
DisplayListmanagerCellEvent | setCellValue | * @return bool | $this->cellValue = $cellValue; | - |
FilterContentEvent | __construct | * @var string | $this->content = $content; | - |
HtmlIncludeEvent | __construct | * @var array | if (null !== $data) {
$this->addData($data); | - |
HtmlIncludeEvent | addData | * only unique entries will be kept. unique will be determine as follows:
* - if an entry in the array has a key, that will be used to ensure uniqueness.
* - if it does not, the md5 sum of the content will be used.
*
* @param array $data
*
* @return void | foreach ($data as $key => $content) {
if ($this->isInteger($key)) {
$key = md5($content); | - |
HtmlIncludeEvent | getData | * @return array | return $this->data; | - |
LocaleChangedEvent | __construct | * @var string|null | $this->newLocal = $newLocal;
$this->originalLocal = $originalLocal; | - |
LocaleChangedEvent | getNewLocal | * @var string|null | return $this->newLocal; | - |
LocaleChangedEvent | getOriginalLocal | * @param string|null $newLocal
* @param string|null $originalLocal | return $this->originalLocal; | - |
RecordChangeEvent | __construct | * @var string | $this->tableId = $tableId;
$this->recordId = $recordId; | - |
RecordChangeEvent | getTableId | * @var string | return $this->tableId; | - |
RecordChangeEvent | getRecordId | * @param string $tableId
* @param string $recordId | return $this->recordId; | - |
expects | __construct | * @psalm-suppress InvalidReturnStatement, InvalidReturnType
* @FIXME Default value of `$content` is an empty array, when everything outside of this class expects `getContent` to return a string. | if (null !== $content) {
$this->setContent($content); | - |
expects | setContent | * @var array|string | $this->content = $content; | - |
expects | getContent | * @param string|null $content | return $this->content; | - |
AddAntispamIncludesListener | __construct | * @var RequestInfoServiceInterface | $this->requestInfoService = $requestInfoService; | - |
AddAntispamIncludesListener | onGlobalHtmlFooterInclude | * @param RequestInfoServiceInterface $requestInfoService | $includes = array();
if (!$this->requestInfoService->isCmsTemplateEngineEditMode()) {
$oAntiSpam = new \antiSpam();
$includes[] = $oAntiSpam->PrintJSCode(); | - |
AddBackendToasterMessageListener | __construct | * @var string | $this->message = $message;
$this->type = $type; | - |
AddBackendToasterMessageListener | addMessage | * @var string | if (!$event->isMainRequest()) {
return; | - |
AddControllerIncludesListener | __construct | * @var RequestInfoServiceInterface | $this->requestInfoService = $requestInfoService;
$this->backendController = $backendController;
$this->frontendController = $frontendController; | - |
AddControllerIncludesListener | onGlobalHtmlHeaderInclude | * @var ChameleonController | if ($this->requestInfoService->isBackendMode()) {
$event->addData($this->backendController->getHtmlHeaderIncludes()); | - |
AddControllerIncludesListener | onGlobalHtmlFooterInclude | * @var ChameleonController | if ($this->requestInfoService->isBackendMode()) {
$event->addData($this->backendController->getHtmlFooterIncludes()); | - |
AddGlobalHeadIncludesListener | __construct | * Class AddJqueryIncludeListener returns the resources configured in the root directory of the snippets.
* Those will be included no matter which modules are being loaded. | $this->viewRendererSnippetDirectory = $viewRendererSnippetDirectory; | - |
AddGlobalHeadIncludesListener | onGlobalHtmlHeaderInclude | * @var \TPkgViewRendererSnippetDirectoryInterface | $event->addData($this->viewRendererSnippetDirectory->getResourcesForSnippetPackage(''));
$event->addData(array(
'<script src="'.TGlobal::GetStaticURLToWebLib('/wysiwyg/functions.js').'" type="text/javascript"></script>',
'<link href="'.TGlobal::GetStaticURLToWebLib('/css/cms_user_style/main.css').'" rel="stylesheet" type="text/css" />',
'<link href="'.TGlobal::GetStaticURLToWebLib('/iconFonts/fileIconVectors/file-icon-square-o.css').'" rel="stylesheet" type="text/css" />',
)); | - |
AddJqueryIncludeListener | onGlobalHtmlHeaderInclude | * @param HtmlIncludeEventInterface $event
*
* @return void | if (true === TGlobal::IsCMSMode()) {
$jqueryInclude = '<script src="'.TGlobal::GetStaticURL('/chameleon/blackbox/javascript/jquery/jquery-3.3.1.min.js').'" type="text/javascript"></script><!--#GLOBALRESOURCECOLLECTION#-->';
$jqueryInclude .= '<script src="'.TGlobal::GetStaticURL('/chameleon/blackbox/javascript/jquery/jquery-migrate-1.4.1.js').'" type="text/javascript"></script><!--#GLOBALRESOURCECOLLECTION#-->';
$event->addData([$jqueryInclude]); | - |
AddModuleIncludesListener | __construct | * @var RequestInfoServiceInterface | $this->requestInfoService = $requestInfoService;
$this->moduleLoader = $moduleLoader;
$this->userModuleLoader = $userModuleLoader; | - |
AddModuleIncludesListener | onGlobalHtmlHeaderInclude | * @var \TModuleLoader | if ($this->requestInfoService->isBackendMode()) {
$event->addData($this->moduleLoader->GetHtmlHeadIncludes()); | - |
AddModuleIncludesListener | onGlobalHtmlFooterInclude | * @var \TUserModuleLoader | if ($this->requestInfoService->isBackendMode()) {
$event->addData($this->moduleLoader->GetHtmlFooterIncludes()); | - |
AllowEmbeddingForDifferentDomainListener | __construct | * Allow the calling domain to see this page (e.g. in an iframe). | $this->domainsDataAccess = $domainsDataAccess; | - |
AllowEmbeddingForDifferentDomainListener | onKernelRequest | * @var CmsPortalDomainsDataAccessInterface | $request = $event->getRequest();
if (false === $this->isPreviewMode($request)) {
return; | - |
BackendBreadcrumbListener | __construct(
RequestStack $requestStack,
RequestInfoServiceInterface $requestInfoService,
InputFilterUtilInterface $inputFilterUtil,
BackendBreadcrumbServiceInterface $backendBreadcrumbService
) | * @var RequestStack | $this->requestStack = $requestStack;
$this->requestInfoService = $requestInfoService;
$this->inputFilterUtil = $inputFilterUtil;
$this->backendBreadcrumbService = $backendBreadcrumbService; | - |
BackendBreadcrumbListener | onKernelRequest | * @var RequestInfoServiceInterface | if (false === $event->isMainRequest()) {
return; | - |
CaseInsensitivePortalExceptionListener | __construct | * @var CmsPortalDomainsDataAccessInterface | $this->cmsPortalDomainsDataAccess = $cmsPortalDomainsDataAccess; | - |
CaseInsensitivePortalExceptionListener | onKernelException: void | * Returns the path fragment between first and second slash (or everything after the first slash if there is no
* second one) - this might be a portal prefix.
*
* @param string $relativePath
*
* @return string|null | $exception = $event->getThrowable();
if (false === $exception instanceof NotFoundHttpException) {
return; | - |
ChangeChameleonObjectsLocaleListener | __construct | * Class ChangeChameleonObjectsLocaleListener. | $this->portalDomainService = $portalDomainService;
$this->languageService = $languageService; | - |
ChangeChameleonObjectsLocaleListener | onLocaleChangedEvent | * @var PortalDomainServiceInterface | $portal = $this->portalDomainService->getActivePortal();
if (null !== $portal) {
$portal->SetLanguage($this->languageService->getActiveLanguageId());
$portal->LoadFromRow($portal->sqlData); | - |
CheckPortalDomainListener | __construct | * @var PortalDomainServiceInterface | $this->portalDomainService = $portalDomainService;
$this->requestInfoService = $requestInfoService;
$this->forcePrimaryDomain = $forcePrimaryDomain; | - |
CheckPortalDomainListener | onKernelRequest | * @var RequestInfoServiceInterface | if (!$event->isMainRequest()) {
return; | - |
CleanupBreadcrumbAfterDeleteListener | __construct | * @var BackendBreadcrumbServiceInterface | $this->breadcrumbService = $breadcrumbService; | - |
ClearRoutingCacheListener | __construct | * @var ChameleonBaseRouter | $this->router = $router; | - |
ClearRoutingCacheListener | clearRoutingCache | * @param ChameleonBaseRouter $router | $this->router->clearCache(); | - |
InitializeRequestListener | __construct(
RequestInitializer $requestInitializer,
MaintenanceModeServiceInterface $maintenanceModeService,
RequestInfoServiceInterface $requestInfoService
) | * @var RequestInitializer | $this->requestInitializer = $requestInitializer;
$this->maintenanceModeService = $maintenanceModeService;
$this->requestInfoService = $requestInfoService; | - |
InitializeRequestListener | onKernelRequest | * @var MaintenanceModeServiceInterface | if (!$event->isMainRequest()) {
return; | - |
mimics | __construct | * Generates a new session ID after login. Note that this class mimics Symfony behavior in deleting session data
* immediately, contradicting the PHP docs (https://secure.php.net/manual/en/features.session.security.management.php). | $this->requestStack = $requestStack; | - |
mimics | migrateSession | * @var RequestStack | $mainRequest = $this->requestStack->getMainRequest();
if (null === $mainRequest || false === $mainRequest->hasSession()) {
return; | - |
NoCacheForSecurePageListener | onChangeActivePage: void | * Use a no-cache header for every secure page so that browser "back" does not get these pages from the cache.
*
* @see https://redmine.esono.de/issues/33950 | $pageIsProtected = true === $event->getNewActivePage()->fieldExtranetPage;
if ($pageIsProtected) {
header('Cache-Control: no-cache, no-store, must-revalidate'); | - |
RedirectToSecurePageListener | __construct(
RequestStack $requestStack,
UrlUtil $urlUtil,
ICmsCoreRedirect $redirect,
RequestInfoServiceInterface $requestInfoService
) | * @var RequestStack | $this->requestStack = $requestStack;
$this->urlUtil = $urlUtil;
$this->redirect = $redirect;
$this->requestInfoService = $requestInfoService; | - |
RedirectToSecurePageListener | onChangeActivePage: void | * @var UrlUtil | $request = $this->requestStack->getCurrentRequest();
if (null === $request) {
throw new \RuntimeException('No request present during page change'); | - |
RehashBackendUserPasswordListener | __construct | * RehashBackendUserPasswordListener checks if the backend user's password needs to be re-hashed because and older
* hashing algorithm was still in use when the password was hashed. This listener can only be applied after a successful
* login, because only then will the plaintext password be available. | $this->inputFilterUtil = $inputFilterUtil;
$this->passwordHashGenerator = $passwordHashGenerator;
$this->databaseConnection = $databaseConnection;
$this->global = $global; | - |
RehashBackendUserPasswordListener | rehashPassword | * @var InputFilterUtilInterface | $user = $backendLoginEvent->getUser();
$existingHashedPassword = $user->sqlData['crypted_pw']; // We need to access sqlData because the user object is
// an instance of TCMSUser, not TAdbCmsUser.
if (false === $this->passwordHashGenerator->needsRehash($existingHashedPassword)) {
return; | - |
RequestTypeListener | __construct | * @var ContainerInterface | $this->container = $container;
$this->backendRequestType = $backendRequestType;
$this->frontendRequestType = $frontendRequestType;
$this->assetRequestType = $assetRequestType; | - |
RequestTypeListener | onKernelRequest | * @var AbstractRequestType | if (false === $event->isMainRequest()) {
return; | - |
RequestTypeListener | setContainer | * @var AbstractRequestType | $this->container = $container; | - |
TemplateEngineAccessListener | __construct(
readonly private RequestInfoServiceInterface $requestInfoService,
readonly private SecurityHelperAccess $security
) | * TemplateEngineAccessListener checks if the current user has access to the template engine, which is the case if the
* user is logged in to the backend. In the past, this check was performed quite early in the request processing, but
* now we can check only after the session was started in the InitializeRequestListener. | null | - |
TemplateEngineAccessListener | onKernelRequest | * @return void | if (!$event->isMainRequest()) {
return; | - |
FieldTreeNodePortalSelect | GetHTML | * Allows the selection of only the portal root tree nodes (level 1 of tree).
*
* {@inheritdoc} | $translator = $this->getTranslator();
$path = $this->_GetTreePath();
$html = '<input type="hidden" id="'.TGlobal::OutHTML($this->name).'" name="'.TGlobal::OutHTML($this->name).'" value="'.TGlobal::OutHTML($this->data).'" />';
$html .= '<div id="'.TGlobal::OutHTML($this->name).'_path">'.$path.'</div>';
$html .= '<div class="cleardiv"> </div>';
$html .= \TCMSRender::DrawButton(
$translator->trans('chameleon_system_core.field_tree_node.assign_node'),
"javascript:loadTreeNodePortalSelection('".TGlobal::OutJS($this->name)."');",
'fas fa-check');
$html .= \TCMSRender::DrawButton(
$translator->trans('chameleon_system_core.action.reset'),
"javascript:ResetTreeNodeSelection('".TGlobal::OutJS($this->name)."');",
'fas fa-undo');
return $html; | - |
ClassFromTableFieldProvider | __construct | * @var DataAccessClassFromTableFieldProviderInterface | $this->dataAccessClassFromTableFieldProvider = $dataAccessClassFromTableFieldProvider; | - |
ClassFromTableFieldProvider | getFieldClassNameFromTableField | * {@inheritdoc} | if ('id' === $tableField) {
return null; | - |
ClassFromTableFieldProvider | getDictionaryFromTableField | * {@inheritdoc} | $fieldIdentifier = str_replace('`', '', $fieldIdentifier);
$tableConfIdSplit = explode('.', $fieldIdentifier);
if (false === $tableConfIdSplit || 2 !== count($tableConfIdSplit)) {
return null; | - |
ClassFromTableFieldProviderRequestLevelCacheDecorator | __construct | * @var ClassFromTableFieldProviderInterface | $this->subject = $subject; | - |
ClassFromTableFieldProviderRequestLevelCacheDecorator | getFieldClassNameFromTableField | * @var array | if (false === \array_key_exists($tableField, $this->fieldClassNameCache)) {
$this->fieldClassNameCache[$tableField] = $this->subject->getFieldClassNameFromTableField($tableField); | - |
ClassFromTableFieldProviderRequestLevelCacheDecorator | getDictionaryFromTableField | * @var array | if (false === \array_key_exists($fieldIdentifier, $this->dictionaryCache)) {
$this->dictionaryCache[$fieldIdentifier] = $this->subject->getDictionaryFromTableField($fieldIdentifier); | - |
chameleon | boot | * @var int | if (!array_key_exists('HTTP_HOST', $_SERVER)) {
echo 'no HTTP_HOST in chameleon.php';
exit(0); | - |
ActiveCmsUserPermission | hasPermissionToExportTranslationDatabase | * @return bool | /** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
return $securityHelper->isGranted(CmsUserRoleConstants::CMS_USER); | - |
TranslationExporterJSON | __construct | * @var TranslatorBagInterface | $this->translator = $translator; | - |
TranslationExporterJSON | export | * @param string $locale
* @param string $domain
*
* @return string | $messageArray = $this->getMessages($locale, $domain);
return json_encode($messageArray); | - |
JsTranslationController | __construct(
TranslationDomainExportInterface $exporter,
ActiveCmsUserPermissionInterface $activeUserPermission
) | * @var TranslationDomainExportInterface | $this->exporter = $exporter;
$this->activeUserPermission = $activeUserPermission; | - |
JsTranslationController | __invoke | * @var ActiveCmsUserPermissionInterface | if (false === $this->activeUserPermission->hasPermissionToExportTranslationDatabase()) {
throw new AccessDeniedException('chameleon_system_core.translation_exporter.error_not_logged_in'); | - |
Migrator | migrate | * @param string $version
*
* @return void | switch ($version) {
case '6.2':
$migrator = new Migrator62();
break;
default:
throw new InvalidArgumentException('Unsupported version:'.$version); | - |
ComposerData | __construct | * @var string | $this->filePath = $filePath;
$this->data = $data; | - |
ComposerData | getFilePath | * @var array | return $this->filePath; | - |
ComposerData | getData | * @param string $filePath
* @param array $data | return $this->data; | - |
ComposerData | setData | * @return string | $this->data = $data; | - |
ComposerJsonModifier | getComposerData | * ComposerJsonModifier A simple tool for modifying composer.json files.
* Note that this file is for internal use only. No backwards compatibility promises are made for this class. | return new ComposerData($path, json_decode(file_get_contents($path), true)); | - |
ComposerJsonModifier | saveComposerFile | * @param string $path
*
* @return ComposerData | file_put_contents($composerData->getFilePath(), json_encode($composerData->getData(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); | - |
ComposerJsonModifier | addAutoloadClassmap | * @param ComposerData $composerData
*
* @return void | if (isset($composerData->getData()['autoload'])) {
$autoload = $composerData->getData()['autoload']; | - |
ComposerJsonModifier | addRequire | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'require', $newElements); | - |
ComposerJsonModifier | addRequireDev | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'require-dev', $newElements); | - |
ComposerJsonModifier | addSuggest | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'suggest', $newElements); | - |
ComposerJsonModifier | addScripts | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'scripts', $newElements); | - |
ComposerJsonModifier | addConfig | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'config', $newElements); | - |
ComposerJsonModifier | addExtra | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->addToSection($composerData, 'extra', $newElements); | - |
ComposerJsonModifier | removeRequire | * @param ComposerData $composerData
* @param array $newElements
*
* @return void | $this->removeFromSection($composerData, 'require', $elementsToRemove); | - |
ComposerJsonModifier | removeRequireDev | * @param ComposerData $composerData
* @param string $section
* @param array $newElements
* @param bool $forceUpdate
*
* @return void | $this->removeFromSection($composerData, 'require-dev', $elementsToRemove); | - |
ComposerJsonModifier | removeSuggest | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->removeFromSection($composerData, 'suggest', $elementsToRemove); | - |
ComposerJsonModifier | removeScripts | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->removeFromSection($composerData, 'scripts', $elementsToRemove); | - |
ComposerJsonModifier | removeConfig | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->removeFromSection($composerData, 'config', $elementsToRemove); | - |
ComposerJsonModifier | removeExtra | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->removeFromSection($composerData, 'extra', $elementsToRemove); | - |
ComposerJsonModifier | addPostInstallCommands | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->addScriptCommands($composerData, 'post-install-cmd', $elementsToAdd); | - |
ComposerJsonModifier | addPostUpdateCommands | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $this->addScriptCommands($composerData, 'post-update-cmd', $elementsToAdd); | - |
ComposerJsonModifier | removePostInstallCommands | * @param ComposerData $composerData
* @param string $section
* @param array $elementsToRemove
*
* @return void | $this->removeScriptCommands($composerData, 'post-install-cmd', $elementsToRemove); | - |
ComposerJsonModifier | removePostUpdateCommands | * @param ComposerData $composerData
* @param array $elementsToAdd
*
* @return void | $this->removeScriptCommands($composerData, 'post-update-cmd', $elementsToRemove); | - |
ComposerJsonModifier | addKey | * @param ComposerData $composerData
* @param array $elementsToAdd
*
* @return void | $data = $composerData->getData();
if (false === $forceOverwrite && isset($data[$key])) {
return; | - |