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 |
---|---|---|---|---|
MTPkgCommentCore | GetConfig | * @param TdbPkgCommentModuleConfig $oModuleConfiguration
* @return void | if (is_null($this->oModConf)) {
$this->oModConf = TdbPkgCommentModuleConfig::GetNewInstance();
if (!$this->oModConf->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) {
$this->oModConf = null; | - |
MTPkgCommentCore | WriteComment | * method allows us to inject an object that we want to comment on.
*
* @param TCMSRecord $oActiveCommentTypeItem
*
* @return void | $oUser = TdbDataExtranetUser::GetInstance();
$oModuleConfig = $this->GetConfig();
$oGlobal = TGlobal::instance();
$aData = array();
$aData['comment'] = $oGlobal->GetUserData('commentsavetext');
if ($oModuleConfig) {
$aData['pkg_comment_type_id'] = $oModuleConfig->fieldPkgCommentTypeId; | - |
MTPkgCommentCore | EditComment | * @param bool $bSuppressRedirectAfterAction
* @return void | $oActiveComment = $this->GetActiveComment();
if (!is_null($oActiveComment) && $this->EditCommentIsAllowed()) {
return $this->WriteComment($oActiveComment->id); | - |
MTPkgCommentCore | DeleteComment | * Returns the active comment.
*
* @return TdbPkgComment|null | $oActiveComment = $this->GetActiveComment();
$oGlobal = TGlobal::instance();
if (!is_null($oActiveComment) && $this->EditCommentIsAllowed()) {
$oModuleConfig = $this->GetConfig();
$oTableManager = TTools::GetTableEditorManager('pkg_comment', $oActiveComment->id);
if (!empty($oModuleConfig->fieldCommentOnDelete)) {
$oActiveComment->sqlData['comment'] = $oModuleConfig->fieldCommentOnDelete;
$oActiveComment->sqlData['mark_as_deleted'] = 1;
$oTableManager->AllowEditByAll(true);
$oTableManager->Save($oActiveComment->sqlData);
$oTableManager->AllowEditByAll(false); | - |
MTPkgCommentCore | ReportComment | * Execute for view report.
*
* @return void | $oGlobal = TGlobal::instance();
$aData = array();
$aData['reporttext'] = $oGlobal->GetUserData('reporttext');
$aData['commentid'] = $oGlobal->GetUserData('commentid');
$bSendReport = $this->ValidateReportData($aData);
$oComment = TdbPkgComment::GetNewInstance();
if ($bSendReport && $oComment->Load($aData['commentid'])) {
$this->SendEMail($aData['commentid'], $aData['reporttext']);
if (property_exists($oComment, 'fieldMarkAsReported')) {
$oComment->sqlData['mark_as_reported'] = '1';
$oTableManager = TTools::GetTableEditorManager('pkg_comment', $aData['commentid']);
$oTableManager->AllowEditByAll(true);
$oTableManager->Save($oComment->sqlData);
$oTableManager->AllowEditByAll(false); | - |
MTPkgCommentCore | RespondToComment | * Execute for view standard.
*
* @return void | $oUser = TdbDataExtranetUser::GetInstance();
$oMessageManager = TCMSMessageManager::GetInstance();
$oGlobal = TGlobal::instance();
$oModuleConfig = $this->GetConfig();
$aData = array();
$aData['comment'] = $oGlobal->GetUserData('commentsavetext');
$aData['pkg_comment_type_id'] = $oGlobal->GetUserData('commenttypeid');
$aData['pkg_comment_id'] = $oGlobal->GetUserData('sresponseid');
$aData['item_id'] = $oGlobal->GetUserData('objectid');
$bIsValid = $this->ValidateRespondCommentData($aData);
if ($bIsValid) {
$aData['data_extranet_user_id'] = $oUser->id;
$aData['created_timestamp'] = date('Y-m-d H:i:s');
$oTableManager = TTools::GetTableEditorManager('pkg_comment', null);
$oTableManager->AllowEditByAll(true);
$oNewComment = $oTableManager->Save($aData);
$oTableManager->AllowEditByAll(false);
$oConfig = TCMSConfig::GetInstance();
$oConfigParameter = $oConfig->GetConfigParameter('dbversion-pkgComActivityFeed', false, true);
if (!is_null($oConfigParameter)) {
$oNewCommentObject = TdbPkgComment::GetNewInstance($oTableManager->sId);
TdbPkgComActivityFeedObject::AddActivity($oNewCommentObject); | - |
MTPkgCommentCore | GetRssFeed | * Get the module config.
*
* @return TdbPkgCommentModuleConfig|null | $oConfig = $this->GetConfig();
$oComments = $oConfig->GetComments();
if ($oComments->Length() > 0) {
$oActiveItem = $this->GetActiveComment();
$oFeed = new TCMSRssHandler();
/** @var $oFeed TCMSRssHandler* */
$oFeed->AddItemMappingArray(array('comment' => 'summary', 'created_timestamp' => 'updated'));
$oFeed->SetFeedTitle($oActiveItem->GetName());
$i = $oComments->Length();
while ($oComment = $oComments->Next()) {
$oComment->sqlData['name'] = TGlobal::Translate('chameleon_system_comment.text.rss_feed_comment_name', array('%number%' => $i));
$oFeed->AddItem($oComment->sqlData);
--$i; | - |
MTPkgCommentCore | _AllowCache | * Validate input data and write the comment to database.
* If you set parameter $sCommentId this comment will be saved with new comment.
*
* @param string $sCommentId
*
* @return TCMSstdClass|false | return false; | - |
ChameleonSystemCookieConsentExtension | load | * @param array $configs
* @param ContainerBuilder $container
*
* @throws \Exception
*
* @return void | $config = $this->processConfiguration(new Configuration(), $configs);
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/'));
$loader->load('services.xml');
$definition = $container->getDefinition('chameleon_system_cookie_consent.add_cookie_consent_includes_listener');
$definition->replaceArgument(0, $config['position']);
$definition->replaceArgument(1, $config['theme']);
$definition->replaceArgument(2, $config['bg_color']);
$definition->replaceArgument(3, $config['button_bg_color']);
$definition->replaceArgument(4, $config['button_text_color']);
$definition->replaceArgument(5, $config['privacy_policy_system_page_name']); | - |
Configuration | getConfigTreeBuilder | * {@inheritdoc} | $treeBuilder = new TreeBuilder('chameleon_system_cookie_consent');
$root = $treeBuilder->getRootNode();
$root->isRequired();
$root->addDefaultsIfNotSet()
->children()
->scalarNode('position')
->defaultValue('bottom')
->end()
->scalarNode('theme')
->defaultValue('classic')
->end()
->scalarNode('bg_color')
->defaultValue('#363636')
->end()
->scalarNode('button_bg_color')
->defaultValue('#46a546')
->end()
->scalarNode('button_text_color')
->defaultValue('#ffffff')
->end()
->scalarNode('privacy_policy_system_page_name')
->defaultValue('privacy-policy')
->end()
->end();
return $treeBuilder; | - |
AddCookieConsentIncludesListener | __construct(
$position,
$theme,
$bgColor,
$buttonBgColor,
$buttonTextColor,
$privacyPolicySystemPageName,
RequestInfoServiceInterface $requestInfoService,
Environment $twig,
SystemPageServiceInterface $systemPageService
) | * @var string | $this->position = $position;
$this->theme = $theme;
$this->bgColor = $bgColor;
$this->buttonBgColor = $buttonBgColor;
$this->buttonTextColor = $buttonTextColor;
$this->privacyPolicySystemPageName = $privacyPolicySystemPageName;
$this->requestInfoService = $requestInfoService;
$this->twig = $twig;
$this->systemPageService = $systemPageService; | - |
AddCookieConsentIncludesListener | onGlobalHtmlHeaderInclude | * @var string | if (true === $this->requestInfoService->isBackendMode()) {
return; | - |
AddCookieConsentIncludesListener | onGlobalHtmlFooterInclude | * @var string | if (true === $this->requestInfoService->isBackendMode()) {
return; | - |
ChameleonAppKernel | boot | * {@inheritdoc}
*
* @return void | if (true === $this->booted) {
return; | - |
ChameleonHttpKernel | handle | * @var string | if ('' !== $this->trustedProxies) {
$aProxies = explode(',', $this->trustedProxies);
$aTrustedProxies = array();
foreach ($aProxies as $val) {
$val = trim($val);
if ('' !== $val) {
$aTrustedProxies[] = $val; | - |
ChameleonHttpKernel | setTrustedProxies | * {@inheritdoc} | $this->trustedProxies = $trustedProxies; | - |
ChameleonSystemCoreBundle | build | * {@inheritDoc}
*
* @return void | $container->addCompilerPass(new AddBackendMainMenuItemProvidersPass());
$container->addCompilerPass(new AddCronJobsPass());
$container->addCompilerPass(new AddMappersPass());
$container->addCompilerPass(new AddUrlNormalizersPass());
$container->addCompilerPass(new ChameleonModulePass());
$container->addCompilerPass(new ControllerResolverPass());
$container->addCompilerPass(new SetChameleonHttpKernelPass());
$container->addCompilerPass(new SetCsrfTokenManagerFactoryPass());
$container->addCompilerPass(new SetCsrfTokenStoragePass());
$container->addCompilerPass(new CollectRequestStateElementProvidersPass());
$container->addCompilerPass(new MakeLoggerPublicPass()); | - |
FooBar | __construct | * @example
*
* class FooBar {
* use NamedConstructorSupport;
*
* public function __construct($id) {
* // ...
* }
*
* public function Foobar() {
* $this->callConstructorAndLogDeprecation(func_get_args());
* }
*
* } | * // ...
* | - |
FooBar | Foobar | * Calls the main `__constructor` method and logs a deprecation message.
* This method is meant to be called inside of deprecated named constructors
* in order to provide backwards compatibility with extending classes in
* projects that may call the named constructor instead of `parent::__construct`; | * $this->callConstructorAndLogDeprecation(func_get_args());
* | - |
MainMenuMigrator | __construct(
Connection $databaseConnection,
FieldTranslationUtil $fieldTranslationUtil) | * @var Connection | $this->databaseConnection = $databaseConnection;
$this->fieldTranslationUtil = $fieldTranslationUtil;
$this->iconMapping = IconMapping::ICON_MAPPING;
$this->initMainCategoryMapping(); | - |
MainMenuMigrator | getIconMapping: array | * @var FieldTranslationUtil | return $this->iconMapping; | - |
MainMenuMigrator | getMainCategoryMapping: array | * @var array | return $this->mainCategoryMapping; | - |
MainMenuMigrator | migrateUnhandledTableMenuItems: void | * @var array | $contentBoxRows = $this->databaseConnection->fetchAllAssociative('SELECT * FROM `cms_content_box`');
$categoryRows = $this->databaseConnection->fetchAllAssociative('SELECT * FROM `cms_menu_category`');
$categories = [];
foreach ($categoryRows as $categoryRow) {
$categories[$categoryRow['system_name']] = $categoryRow['id']; | - |
MainMenuMigrator | migrateUnhandledContentBoxes: void | * Returns a mapping from old table icons based on file names to new icons based on an icon font.
*
* @return array | $contentBoxRows = $this->databaseConnection->fetchAllAssociative('SELECT * FROM `cms_content_box`');
$mainCategoryMapping = $this->getMainCategoryMapping();
foreach ($contentBoxRows as $contentBoxRow) {
$contentBoxSystemName = $contentBoxRow['system_name'];
if ('' === $contentBoxSystemName) {
continue; | - |
MainMenuMigrator | migrateContentBox: void | * Returns a mapping of old main menu content boxes to new sidebar menu categories. | $query = 'SELECT * FROM `cms_content_box` WHERE `system_name` = :systemName';
$row = $this->databaseConnection->fetchAssociative($query, array('systemName' => $oldContentBoxSystemName));
if (false === $row) {
\TCMSLogChange::addInfoMessage(\sprintf('No content box found for system name "%s"', $oldContentBoxSystemName), \TCMSLogChange::INFO_MESSAGE_LEVEL_ERROR);
return; | - |
ModuleIconMigrator | __construct(
Connection $databaseConnection
) | * @var array | $this->databaseConnection = $databaseConnection;
$this->iconMapping = IconMapping::ICON_MAPPING; | - |
ModuleIconMigrator | migrateModuleIcon | * @var Connection | $query = 'SELECT * FROM `cms_tpl_module` WHERE `classname` = :module';
$row = $this->databaseConnection->fetchAssociative($query, array('module' => $module));
if (false === $row) {
\TCMSLogChange::addInfoMessage(\sprintf('Template Module "%s" could not be found.', $module), \TCMSLogChange::INFO_MESSAGE_LEVEL_ERROR);
return; | - |
ModuleIconMigrator | migrateUnhandledModules | * @return void | $moduleRecordList = $this->databaseConnection->fetchAllAssociative("SELECT * FROM `cms_tpl_module` WHERE `icon_font_css_class` = '' AND `icon_list` != ''");
foreach ($moduleRecordList as $moduleRecord) {
$this->migrateModuleIconByRecord($moduleRecord, $additionalIconMapping); | - |
NavigationTree | __construct(
Connection $dbConnection,
EventDispatcherInterface $eventDispatcher,
InputFilterUtilInterface $inputFilterUtil,
BackendTreeNodeFactory $backendTreeNodeFactory,
PortalDomainServiceInterface $portalDomainService,
TranslatorInterface $translator,
UrlUtil $urlUtil,
NestedSetHelperFactoryInterface $nestedSetHelperFactory,
TTools $tools,
TGlobal $global,
FieldTranslationUtil $fieldTranslationUtil,
BackendSessionInterface $backendSession
) | * The mysql tablename of the tree.
*
* @var string | parent::__construct();
$this->dbConnection = $dbConnection;
$this->eventDispatcher = $eventDispatcher;
$this->inputFilterUtil = $inputFilterUtil;
$this->backendTreeNodeFactory = $backendTreeNodeFactory;
$this->portalDomainService = $portalDomainService;
$this->translator = $translator;
$this->urlUtil = $urlUtil;
$this->nestedSetHelperFactory = $nestedSetHelperFactory;
$this->tools = $tools;
$this->global = $global;
$this->fieldTranslationUtil = $fieldTranslationUtil;
$this->editLanguage = \TdbCmsLanguage::GetNewInstance($backendSession->getCurrentEditLanguageId()); | - |
NavigationTree | Accept | * @var string | $isInIframe = $this->inputFilterUtil->getFilteredInput('isInIframe', '0');
$visitor->SetMappedValue('isInIframe', $isInIframe);
$this->fieldName = $this->inputFilterUtil->getFilteredGetInput('fieldName', '');
$visitor->SetMappedValue('fieldName', $this->fieldName);
$noAssignDialog = $this->inputFilterUtil->getFilteredGetInput('noassign', '0');
$visitor->SetMappedValue('noAssignDialog', $noAssignDialog);
$pageTableId = $this->tools->GetCMSTableId('cms_tpl_page');
$treeTableName = 'cms_tree';
$treeTableRecordId = $this->tools->GetCMSTableId($treeTableName);
$treeNodeTableName = 'cms_tree_node';
$treeNodeTableRecordId = $this->tools->GetCMSTableId($treeNodeTableName);
$currentPageId = $this->inputFilterUtil->getFilteredGetInput('id', '');
$primaryConnectedNodeIdOfCurrentPage = $this->inputFilterUtil->getFilteredGetInput('primaryTreeNodeId', '');
$this->rootNodeId = $this->inputFilterUtil->getFilteredGetInput('rootID', \TCMSTreeNode::TREE_ROOT_ID);
/** @var BackendSessionInterface $backendSession */
$backendSession = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_cms_backend.backend_session');
$activeLanguageIsoCode = $backendSession->getCurrentEditLanguageIso6391();
$activeLanguageId = null !== $activeLanguageIsoCode ? $this->dbConnection->fetchOne("select `id` from `cms_language` where `iso_6391` = :isoCode", ['isoCode' => $activeLanguageIsoCode]) : false;
if ('' !== $currentPageId) {
$rootNode = new \TdbCmsTree();
if (false !== $activeLanguageId) {
$rootNode->SetLanguage($activeLanguageId); | - |
NavigationTree | GetHtmlHeadIncludes | * @var string | $includes = parent::GetHtmlHeadIncludes();
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/jsTree/3.3.8/jstree.js'));
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/navigationTree.js'));
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/jquery/cookie/jquery.cookie.js'));
$includes[] = sprintf('<link rel="stylesheet" href="%s">', $this->global->GetStaticURLToWebLib('/javascript/jsTree/3.3.8/themes/default/style.css'));
$includes[] = sprintf('<link rel="stylesheet" href="%s">', $this->global->GetStaticURLToWebLib('/javascript/jsTree/customStyles/style.css'));
return $includes; | - |
NavigationTree | _GetCacheParameters | * @var string | $parameters = parent::_GetCacheParameters();
if (false === is_array($parameters)) {
$parameters = []; | - |
NavigationTreeSingleSelect | __construct(
InputFilterUtilInterface $inputFilterUtil,
UrlUtil $urlUtil,
BackendTreeNodeFactory $backendTreeNodeFactory,
TranslatorInterface $translator,
TTools $tools,
TGlobal $global,
FieldTranslationUtil $fieldTranslationUtil,
BackendSessionInterface $backendSession
) | * The mysql tablename of the tree.
*
* @var string | $this->inputFilterUtil = $inputFilterUtil;
$this->urlUtil = $urlUtil;
$this->backendTreeNodeFactory = $backendTreeNodeFactory;
$this->translator = $translator;
$this->tools = $tools;
$this->global = $global;
$this->fieldTranslationUtil = $fieldTranslationUtil;
$this->editLanguage = \TdbCmsLanguage::GetNewInstance($backendSession->getCurrentEditLanguageId()); | - |
NavigationTreeSingleSelect | Init | * @var InputFilterUtilInterface | parent::Init();
$portalSelectMode = $this->inputFilterUtil->getFilteredGetInput('portalSelectMode', '');
// variables are needed in module functions:
$this->isPortalSelectMode = 'portalSelect' === $portalSelectMode;
$this->isPortalHomeNodeSelectMode = 'portalHomePage' === $portalSelectMode; // also 404-page-selection
// NOTE the selection of "Page not found" for a portal is handled special (old) with TCMSFieldPortalHomeTreeNode.
// The "normal" selection of a tree node anywhere (i. e. for system pages) is handled with TCMSFieldTreeNode.
$this->isSelectModeForPage = 'true' === $this->inputFilterUtil->getFilteredGetInput('selectModeForPage', 'false'); | - |
NavigationTreeSingleSelect | Accept | * @var TranslatorInterface | $fieldName = $this->inputFilterUtil->getFilteredGetInput('fieldName', '');
$this->activeNodeId = $this->inputFilterUtil->getFilteredGetInput('id', '');
$portalSelectMode = $this->inputFilterUtil->getFilteredGetInput('portalSelectMode', '');
$visitor->SetMappedValue('portalSelectMode', $portalSelectMode);
$isSelectModeForPage = false;
$pagedef = $this->inputFilterUtil->getFilteredGetInput('pagedef', 'navigationTreeSingleSelect');
if ('' !== $portalSelectMode) {
$tableNameForUpdate = 'cms_portal';
$currentRecordId = $this->inputFilterUtil->getFilteredGetInput('portalId', ''); | - |
NavigationTreeSingleSelect | GetHtmlHeadIncludes | * @var UrlUtil | $includes = parent::GetHtmlHeadIncludes();
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/jsTree/3.3.8/jstree.js'));
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/navigationTree.js'));
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>', $this->global->GetStaticURLToWebLib('/javascript/jquery/cookie/jquery.cookie.js'));
$includes[] = sprintf('<link rel="stylesheet" href="%s">', $this->global->GetStaticURLToWebLib('/javascript/jsTree/3.3.8/themes/default/style.css'));
$includes[] = sprintf('<link rel="stylesheet" href="%s">', $this->global->GetStaticURLToWebLib('/javascript/jsTree/customStyles/style.css'));
return $includes; | - |
NavigationTreeSingleSelectWysiwyg | __construct(
InputFilterUtilInterface $inputFilterUtil,
UrlUtil $urlUtil,
BackendTreeNodeFactory $backendTreeNodeFactory,
TranslatorInterface $translator,
TTools $tools,
TGlobal $global,
FieldTranslationUtil $fieldTranslationUtil,
BackendSessionInterface $backendSession,
RequestStack $requestStack
) | * {@inheritdoc} | parent::__construct(
$inputFilterUtil,
$urlUtil,
$backendTreeNodeFactory,
$translator,
$tools,
$global,
$fieldTranslationUtil,
$backendSession
);
$this->requestStack = $requestStack; | - |
NavigationTreeSingleSelectWysiwyg | Accept | * @var RequestStack | parent::Accept($visitor, $cachingEnabled, $cacheTriggerManager);
$request = $this->requestStack->getCurrentRequest();
if (null === $request) {
return; | - |
CustomMenuItemProvider | createMenuItem: ?MenuItem | * {@inheritdoc} | $customItem = new \TdbCmsMenuCustomItem($menuItem->fieldTarget);
if (false === $this->isItemAccessAllowed($customItem)) {
return null; | - |
MenuCategory | __construct | * @var string | $this->id = $id;
$this->name = $name;
$this->iconFontCssClass = $iconFontCssClass;
$this->menuItems = $menuItems; | - |
MenuCategory | getId: string | * @var string | return $this->id; | - |
MenuCategory | getName: string | * @var string | return $this->name; | - |
MenuCategory | getIconFontCssClass: string | * @var MenuItem[] | return $this->iconFontCssClass; | - |
MenuCategory | getMenuItems: array | * @param string $id
* @param string $name
* @param string $iconFontCssClass
* @param MenuItem[] $menuItems | return $this->menuItems; | - |
MenuItem | __construct | * @var string | $this->name = $name;
$this->icon = $icon;
$this->url = $url;
$this->id = $id; | - |
MenuItem | getName: string | * @var string | return $this->name; | - |
MenuItem | getIcon: string | * @var string | return $this->icon; | - |
MenuItem | getUrl: string | * @var string | return $this->url; | - |
MenuItemFactory | addMenuItemProvider: void | * @var MenuItemProviderInterface[] | $this->menuItemProviders[$type] = $menuItemProvider; | - |
MenuItemFactory | createMenuItem: ?MenuItem | * {@inheritdoc} | $targetType = $menuItem->GetFieldTargetObjectType();
if (false === \array_key_exists($targetType, $this->menuItemProviders)) {
return null; | - |
ModuleMenuItemProvider | createMenuItem: ?MenuItem | * {@inheritdoc} | $cmsModule = new \TdbCmsModule($menuItem->fieldTarget);
if (false === $this->isModuleAccessAllowed($cmsModule)) {
return null; | - |
SidebarBackendModule | __construct(
UrlUtil $urlUtil,
RequestStack $requestStack,
InputFilterUtilInterface $inputFilterUtil,
ResponseVariableReplacerInterface $responseVariableReplacer,
MenuItemFactoryInterface $menuItemFactory,
TranslatorInterface $translator,
UserMenuItemDataAccessInterface $userMenuItemDataAccess
) | * @var UrlUtil | parent::__construct();
$this->urlUtil = $urlUtil;
$this->requestStack = $requestStack;
$this->inputFilterUtil = $inputFilterUtil;
$this->responseVariableReplacer = $responseVariableReplacer;
$this->menuItemFactory = $menuItemFactory;
$this->translator = $translator;
$this->userMenuItemDataAccess = $userMenuItemDataAccess; | - |
SidebarBackendModule | Init | * @var RequestStack | parent::Init();
$this->restoreDisplayState(); | - |
SidebarBackendModule | Accept | * @var InputFilterUtilInterface | $visitor->SetMappedValue('sidebarToggleCategoryNotificationUrl', $this->getNotificationUrl('toggleCategoryOpenState'));
$visitor->SetMappedValue('sidebarElementClickNotificationUrl', $this->getNotificationUrl('reportElementClick'));
$visitor->SetMappedValue('menuItems', $this->getMenuItems());
if (true === $cachingEnabled) {
/** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
$cacheTriggerManager->addTrigger('cms_tbl_conf', null);
$cacheTriggerManager->addTrigger('cms_module', null);
$cacheTriggerManager->addTrigger('cms_user', $securityHelper->getUser()?->getId());
$cacheTriggerManager->addTrigger('cms_menu_category', null);
$cacheTriggerManager->addTrigger('cms_menu_item', null); | - |
SidebarBackendModule | GetHtmlHeadIncludes | * @var ResponseVariableReplacerInterface | $includes = parent::GetHtmlHeadIncludes();
$includes[] = sprintf('<link rel="stylesheet" href="%s/coreui/css/perfect-scrollbar.css" type="text/css" />',
\TGlobal::GetPathTheme());
return $includes; | - |
SidebarBackendModule | GetHtmlFooterIncludes | * @var MenuItemFactoryInterface | $includes = parent::GetHtmlFooterIncludes();
$includes[] = sprintf('<script src="%s" type="text/javascript"></script>',
\TGlobal::GetStaticURLToWebLib('/javascript/modules/sidebar/sidebar.js'));
return $includes; | - |
SidebarBackendModule | _AllowCache | * @var TranslatorInterface | return true; | - |
SidebarBackendModule | _GetCacheParameters | * @var UserMenuItemDataAccessInterface | $parameters = parent::_GetCacheParameters();
/** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
$user = $securityHelper->getUser();
if (null !== $user) {
$parameters['cmsUserId'] = $user->getId();
$parameters['backendLanguageId'] = $user->getCmsLanguageId();
$session = $this->getSession();
if (null !== $session) {
$parameters['sessionId'] = $session->getId(); | - |
TableMenuItemProvider | createMenuItem: ?MenuItem | * {@inheritdoc} | $tableConf = \TdbCmsTblConf::GetNewInstance();
$loadSuccess = $tableConf->Load($menuItem->fieldTarget);
if (false === $loadSuccess) {
return null; | - |
StaticViewModule | __construct | * Can be used to display static information in the backend. The module requires the additional module config parameter
* "targetView" containing the path to the view to be displayed (relative to snippets-cms). This path name may contain a
* "[{language}]" placeholder. If present, this placeholder will be replaced with the current display language. | parent::__construct();
$this->languageService = $languageService; | - |
StaticViewModule | Accept | * @var LanguageServiceInterface | $targetView = $this->aModuleConfig['targetView'];
$targetLanguage = $this->languageService->getActiveLanguage()->fieldIso6391;
$targetView = \str_replace('[{language | - |
ActivateMaintenanceModeCommand | __construct | * @var MaintenanceModeServiceInterface | parent::__construct('chameleon_system:maintenance_mode:activate');
$this->maintenanceModeService = $maintenanceModeService; | - |
CountUpdateCommand | __construct | * Console command for counting updates that have not been executed yet. | parent::__construct('chameleon_system:update:count'); | - |
DeactivateMaintenanceModeCommand | __construct | * @var MaintenanceModeServiceInterface | parent::__construct('chameleon_system:maintenance_mode:deactivate');
$this->maintenanceModeService = $maintenanceModeService; | - |
DisableCronjobsCommand | __construct | * @var CronjobEnablingServiceInterface | parent::__construct('chameleon_system:cronjobs:disable');
$this->cronjobEnablingService = $cronjobEnablingService; | - |
EnableCronjobsCommand | __construct | * @var CronjobEnablingServiceInterface | parent::__construct('chameleon_system:cronjobs:enable');
$this->cronjobEnablingService = $cronjobEnablingService; | - |
GetCronjobsStateCommand | __construct | * @var CronjobStateServiceInterface | parent::__construct('chameleon_system:cronjobs:state_check');
$this->cronjobStateService = $cronjobStateService; | - |
ListUpdateCommand | __construct | * Console command for listing updates that have not been executed yet. | parent::__construct('chameleon_system:update:list'); | - |
RunUpdateCommand | __construct | * Console command for executing updates. | parent::__construct('chameleon_system:update:run');
$this->cache = $cache;
$this->autoclassesCacheWarmer = $autoclassesCacheWarmer; | - |
HtmlHelper | __construct | * @var OutputInterface | $style = new OutputFormatterStyle('red', null, array('bold'));
$output->getFormatter()->setStyle('header', $style);
$this->output = $output; | - |
HtmlHelper | render | * @var array | if (null !== $html) {
$this->computeHtml($html); | - |
ChameleonBackendController | getResponse | * @var BackendAccessCheck | $request = $this->getRequest();
$pagedef = $this->getInputFilterUtil()->getFilteredInput('pagedef', $this->homePagedef);
$request->attributes->set('pagedef', $pagedef);
$this->backendAccessCheck->assertAccess();
return $this->GeneratePage($pagedef); | - |
ChameleonBackendController | HandleRequest | * @var string | $oCMSConfig = \TdbCmsConfig::GetInstance();
if (!$oCMSConfig) { // sometimes config comes corrupted from cache then reload config from db
$oCMSConfig = \TdbCmsConfig::GetInstance(true); | - |
ChameleonBackendController | setBackendAccessCheck | * {@inheritdoc} | $this->backendAccessCheck = $backendAccessCheck; | - |
ChameleonBackendController | setHomePagedef: void | * check if ip of user is in ip white list of cms config
* but only if a white list or the config constant x is set.
*
* The entry point into the controller. It will render a page given a
* pagedefinition file. If no definition file is passed, it will use
* "default" as the active definition file
*
* @param string $pagedef - The name of the page definition file to render.
* Notice that only the name should be passed. The location of
* the definition file is defined in the config.inc.php file loaded
* in TGlobal (PATH_PAGE_DEFINITIONS)
*
* @return void | $this->homePagedef = $homePagedef; | - |
ChameleonController | __construct(
RequestStack $requestStack,
EventDispatcherInterface $eventDispatcher,
DataAccessCmsMasterPagedefInterface $dataAccessCmsMasterPagedef,
TModuleLoader $moduleLoader,
IViewPathManager $viewPathManager = null
) | * @var AuthenticityTokenManagerInterface | $this->requestStack = $requestStack;
$this->moduleLoader = $moduleLoader;
$this->moduleLoader->setController($this);
$this->viewPathManager = $viewPathManager;
$this->eventDispatcher = $eventDispatcher;
$this->dataAccessCmsMasterPagedef = $dataAccessCmsMasterPagedef; | - |
ChameleonController | __invoke | * @var RequestStack | $event = new ChameleonControllerInvokeEvent($this);
$this->eventDispatcher->dispatch($event, ChameleonControllerEvents::INVOKE);
$pagedef = $this->getRequest()->attributes->get('pagedef');
$this->handleRequest($pagedef);
return $this->getResponse(); | - |
ChameleonController | setGlobal | * @var CacheInterface | $this->global = $global; | - |
ChameleonController | SetBlockAutoFlushToBrowser | * @var TGlobal | $this->bBlockAutoFlushToBrowser = $bBlockAutoFlushToBrowser; | - |
ChameleonController | getBlockAutoFlushToBrowser | * @var TModuleLoader | return $this->bBlockAutoFlushToBrowser; | - |
ChameleonController | setCache | * @var array
*
* @deprecated since 6.3.0 - not used anymore | $this->cache = $cache; | - |
ChameleonController | GetPagedefObject | * @var array | /** @var $oPageDefinitionFile TCMSPageDefinitionFile */
$oPageDefinitionFile = new TCMSPageDefinitionFile();
$fullPageDefPath = $this->PageDefinitionFile($pagedef);
$pagePath = substr($fullPageDefPath, 0, -strlen($pagedef.'.pagedef.php'));
if (!$oPageDefinitionFile->Load($pagedef, $pagePath)) {
$oPageDefinitionFile = false; | - |
ChameleonController | PreOutputCallbackFunction | * @var array | static $bHeaderParsed = false;
TPkgCmsEventManager::GetInstance()->NotifyObservers(
TPkgCmsEvent::GetNewInstance($this, TPkgCmsEvent::CONTEXT_CORE, TPkgCmsEvent::NAME_PRE_OUTPUT_CALLBACK_FUNCTION, array('sPageContent' => $sPageContent)));
if (!$bHeaderParsed) {
// parse and replace header includes, call resource collection
$sPageContent = $this->injectHeaderIncludes($sPageContent); | - |
ChameleonController | PreOutputCallbackFunctionReplaceCustomVars | * @var string
*
* @deprecated since 6.3.0 - not used anymore | return $this->responseVariableReplacer->replaceVariables($sPageContent); | - |
ChameleonController | FlushContentToBrowser | * @var bool | if (false === CHAMELEON_ENABLE_FLUSHING && !TGlobal::IsCMSMode()) {
return; | - |
ChameleonController | AddHTMLFooterLine | * @var IViewPathManager | if (!in_array($sLine, $this->aFooterIncludes)) {
$this->aFooterIncludes[] = $sLine; | - |
ChameleonController | AddHTMLHeaderLine | @var ActivePageServiceInterface | if (!in_array($sLine, $this->aHeaderIncludes)) {
$this->aHeaderIncludes[] = $sLine; | - |
ChameleonController | HeaderRedirect | * @var EventDispatcherInterface | $this->redirect->redirectToActivePage($aParameters); | - |
ChameleonController | HeaderURLRedirect | * @var RequestInfoServiceInterface | $this->redirect->redirect($url, Response::HTTP_FOUND, $bAllowOnlyRelativeURLs); | - |
ChameleonController | __toString | * @var ICmsCoreRedirect
*
* @deprecated since 6.1.9 - no longer used in this class. | return get_class($this); | - |
ChameleonController | setActivePageService | * @var InputFilterUtilInterface | $this->activePageService = $activePageService; | - |
ChameleonController | getHtmlHeaderIncludes | * @var ResourceCollectorInterface | return $this->aHeaderIncludes; | - |
ChameleonController | getHtmlFooterIncludes | * @var DataAccessCmsMasterPagedefInterface | return $this->aFooterIncludes; | - |
ChameleonController | setAuthenticityTokenManager | * @var ResponseVariableReplacerInterface | $this->authenticityTokenManager = $authenticityTokenManager; | - |
ChameleonController | setRequestInfoService | * {@inheritdoc} | $this->requestInfoService = $requestInfoService; | - |
ChameleonController | setRedirect | * @return Request|null | $this->redirect = $redirect; | - |
ChameleonController | setInputFilterUtil | * @param TGlobal $global
*
* @return void | $this->inputFilterUtil = $inputFilterUtil; | - |
ChameleonController | setResourceCollector: void | * @param bool $bBlockAutoFlushToBrowser
*
* @return void | $this->resourceCollector = $resourceCollector; | - |
ChameleonController | setResponseVariableReplacer: void | * @return bool | $this->responseVariableReplacer = $responseVariableReplacer; | - |
ChameleonControllerInvokeEvent | __construct | * @var ChameleonControllerInterface | $this->controller = $controller; | - |