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 |
---|---|---|---|---|
ComposerJsonModifier | removeKey | * @param ComposerData $composerData
* @param string $commandType
* @param array $elementsToAdd
*
* @return void | $data = $composerData->getData();
unset($data[$key]);
$composerData->setData($data); | - |
ComposerJsonModifier | removeRepository | * @param ComposerData $composerData
* @param array $elementsToRemove
*
* @return void | $data = $composerData->getData();
$repositories = $data['repositories'];
foreach ($repositories as $index => $repository) {
if (isset($repository['url']) && $repository['url'] === $url) {
unset($repositories[$index]);
$repositories = array_values($repositories);
break; | - |
MaintenanceModeService | __construct | * @var Connection | $this->connection = $connection;
$this->cache = $cache; | - |
MaintenanceModeService | isActive: bool | * @var CacheInterface | if (true === \TdbCmsConfig::GetInstance()->fieldShutdownWebsites) {
/*
* This location should not have been reached if maintenance mode is on.
* The reason could be that the file/stat cache is outdated. So we refresh it here for the next request / the imminent redirect.
*/
clearstatcache(true, PATH_MAINTENANCE_MODE_MARKER);
return true; | - |
MaintenanceModeService | activate: void | * @throws MaintenanceModeErrorException | try {
$this->connection->executeUpdate("UPDATE `cms_config` SET `shutdown_websites` = '1'");
$this->cache->callTrigger('cms_config'); | - |
MaintenanceModeService | deactivate: void | * @throws MaintenanceModeErrorException | $this->removeMarkerFile();
try {
$this->connection->executeUpdate("UPDATE `cms_config` SET `shutdown_websites` = '0'");
$this->cache->callTrigger('cms_config'); | - |
Migrator62 | __construct | * @var string | $this->baseDir = realpath(__DIR__.'/../../../../../../..'); | - |
Migrator62 | migrate | * @return void | $this->migrate62FileBase();
$this->migrate62ComposerJson();
$this->finish(); | - |
MapperLoader | __construct | * @var ServiceLocator | $this->serviceLocator = $serviceLocator; | - |
MapperLoader | getMapper | * {@inheritdoc} | try {
$service = $this->serviceLocator->get($identifier); | - |
ModuleExecutionStrategyInline | execute | * {@inheritdoc} | return $module->__invoke($request, $isLegacyModule); | - |
ModuleExecutionStrategySubRequest | __construct | * @var CacheInterface | $this->cache = $cache;
$this->kernel = $kernel; | - |
ModuleExecutionStrategySubRequest | execute | * @var KernelInterface | $esiPath = $this->getModuleESIPath($request, $module, $spotName);
$moduleRequest = $request->duplicate();
$moduleRequest->server->set('REQUEST_URI', $esiPath);
$moduleRequest->attributes->set('_controller', $module);
$moduleRequest->attributes->set('isLegacyModule', $isLegacyModule);
return $this->kernel->handle($moduleRequest, HttpKernelInterface::SUB_REQUEST); | - |
ModuleResolver | __construct | * @var ContainerInterface | $this->container = $container; | - |
ModuleResolver | getModule | * {@inheritdoc} | if (false === $this->container->has($name)) {
return null; | - |
ModuleResolver | hasModule | * {@inheritdoc} | return $this->container->has($name); | - |
TCMSModelBase | ExecuteAjaxCall | * returns true if the module may add its url to the history object.
*
* @return bool | $methodName = $this->global->GetUserData('_fnc');
if (empty($methodName)) {
trigger_error('Ajax call made, but no function passed via _fnc', E_USER_ERROR); | - |
TCMSModelBase | Execute | * checks if the call was made via ajax.
*
* @return bool | parent::Execute();
/** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
$user = $securityHelper->getUser();
$userObject = null;
if (null !== $user) {
$userObject = TdbCmsUser::GetNewInstance();
$userObject->Load($user->getId()); | - |
TCMSModelBase | GetHtmlHeadIncludes | * {@inheritdoc} | static $includes = null;
if (null !== $includes) {
return $includes; | - |
TGlobal | GetWebuserLoginData | * call it to find out if we are in the cms or on the webpage.
*
* @return bool | return array('loginName' => 'www', 'password' => 'www'); | - |
TGlobal | GetUserData | * Translates the given message.
*
* @param string $id The message id (may also be an object that can be cast to string)
* @param array $parameters An array of parameters for the message
* @param string|null $domain The domain for the message or null to use the default
* @param string|null $locale The locale or null to use the default
*
* @throws InvalidArgumentException If the locale contains invalid characters
*
* @return string The translated string
*
* @deprecated deprecated since 6.1.0 - please use the "translator" service | if (self::MODE_BACKEND === self::$mode) {
$sFilterClass = ''; | - |
TGlobal | GetLanguageIdList | * returns the value of variable $name or if missing the whole array filtered by $excludeArray
* the data is unfiltered.
*
* @param string $name
* @param array $excludeArray
* @param string $sFilterClass - form: classname;path;type|classname;path;type
*
* @return mixed - string or array
*
* @deprecated since 6.2.0 - use InputFilterUtilInterface::getFiltered*Input() instead. | if (self::MODE_BACKEND === self::$mode) {
// get security helper
/** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
$languages = $securityHelper->getUser()?->getAvailableEditLanguages();
if (null === $languages) {
$languages = []; | - |
provides | __construct | * all global classes used in the framework (ie. for both the cms and the user
* side) should inherit from this. this class provides the basic functionality
* such as class factory, get/post filtering, etc.
*
/* | $this->requestStack = $requestStack;
$this->inputFilterUtil = $inputFilterUtil;
$this->kernel = $kernel; | - |
provides | __get | * holds the state of portal based class transformation.
*
* @var bool | if ('userData' === $sParameterName) {
$trace = debug_backtrace();
trigger_error('userData is no longer available - use \ChameleonSystem\CoreBundle\ServiceLocator::get("request_stack")->getCurrentRequest() instead in '.$trace[1]['file'].' on line '.$trace[1]['line'], E_USER_ERROR);
return null; | - |
provides | SetExecutingModulePointer | * URL path to backend http resources.
*
* @var string | $this->oExecutingModuleObject = $oExecutingModuleObject; | - |
provides | GetExecutingModulePointer | * a copy of all rewrite parameter - these parameters will be excluded from the GetRealURL request (since they are part of the url anyway).
*
* @var array | return $this->oExecutingModuleObject; | - |
provides | GetLanguageIdList | * used to cache any data that may be needed globally
* (like a list of portals, etc).
*
* @var array | $oCMSConfig = TdbCmsConfig::GetInstance();
return [$oCMSConfig->fieldTranslationBaseLanguageId]; | - |
provides | UserDataExists | * holds the current executing module object.
*
* @var TModelBase | $request = $this->getRequest();
return null !== $request && null !== $request->get($name, null); | - |
provides | GetUserData | * config class of the HTMLPurifier XSS filter.
*
* @var HTMLPurifier_Config | $outputData = '';
$request = $this->getRequest();
if (null !== $request) {
if (null !== $name) { // get value for key
$outputData = $this->inputFilterUtil->getFilteredInput($name, '', false, $sFilterClass); | - |
provides | GetRawUserData | @var RequestStack | return $this->GetUserData($name, $excludeArray, TCMSUserInput::FILTER_NONE); | - |
provides | SetUserData | * @var InputFilterUtilInterface | $request = $this->getRequest();
$request->query->set($sArrayKeyName, $Value); | - |
provides | SetPurifierConfig | * @var KernelInterface | if (is_null($this->oHTMLPurifyConfig)) {
/** @var $config HTMLPurifier_Config */
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.TidyLevel', 'none');
$config->set('Core.RemoveInvalidImg', false);
$config->set('Core.AggressivelyFixLt', false);
$config->set('Core.ConvertDocumentToFragment', false);
$config->set('Cache.SerializerPath', PATH_CMS_CUSTOMER_DATA);
$this->oHTMLPurifyConfig = $config; | - |
provides | OutputUserData | * needs to be overwritten in the child class. should return a pointer to
* an instance of the child global class.
*
* @return TGlobalBase
*
* @deprecated Use \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.global') instead | return htmlspecialchars($this->GetUserData($name), ENT_QUOTES); | - |
provides | getModuleRootPath | * called by the controller to set the pointer to the currently executing module instance.
*
* @param TModelBase $oExecutingModuleObject | $bundlePath = self::instance()->resolveBundlePath($type);
if (null !== $bundlePath) {
return $bundlePath.'/objects/BackendModules/'; | - |
provides | _GetPagedefRootPath | * return pointer to the currently executing module object.
*
* @return TModelBase | $bundlePath = $this->resolveBundlePath($sType);
if (null !== $bundlePath) {
return $bundlePath.'/Resources/BackendPageDefs/'; | - |
provides | GetPortals | * return a pointer to the controller running the show.
*
* @return ChameleonControllerInterface
*
* @deprecated Use \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.chameleon_controller') instead | if (!array_key_exists('oPortals', $this->_dataCache)) {
$this->_dataCache['oPortals'] = new TCMSPortalList(); | - |
provides | SetRewriteParameter | * returns the base URL of the current backend theme
* uses GetStaticURL to return optional static domain.
*
* @return string | $this->aRewriteParameter = $aParameter; | - |
provides | GetRewriteParameter | * returns the static path to the given file in the blackbox directory.
*
* @param string $sFilePath - the relative url of the file in relation to the blackbox directory
* @param bool $bForceNonSSL - used to force urls to non SSL
*
* @return string | return $this->aRewriteParameter; | - |
provides | __call | * @return string[]|string | $aBackwardsCompatMethods = array();
$aBackwardsCompatMethods['GetuserData'] = 'GetUserData';
$aBackwardsCompatMethods['userDataExists'] = 'UserDataExists';
if (array_key_exists($name, $aBackwardsCompatMethods)) {
$sNewMethodName = $aBackwardsCompatMethods[$name];
$oGlobal = TGlobal::instance();
$oGlobal->$sNewMethodName(implode(', ', $arguments));
// we should trigger notices if in development mode | - |
provides | isFrontendJSDisabled | * @param string $sURL
*
* @return string | $bExclude = ($this->UserDataExists('esdisablefrontendjs') && 'true' == $this->GetUserData('esdisablefrontendjs'));
return $bExclude; | - |
provides | __sleep | * returns the config constant URL_STATIC or "/" if SSL is active
* overwrite this method if you use a Content Delivery Network and need different
* URLs for different content types (images from CDN, JS library from code.google.com, CSS from local)
* you can check the path or file type to solve this.
*
* @param string $sFilePath - the relative url to get a static server
* @param bool $bForceNonSSL - used to force urls to non SSL
*
* @return string | // avoid $requestStack being serialized
return array(); | - |
TModelBase | setController | * the view template path to load (without .view.php ending).
*
* @var string | $this->controller = $controller; | - |
TModelBase | __wakeup | * array of module configuration data from pagedef.
*
* @var array | $this->bIsWakingUp = true;
$this->Init();
$this->bIsWakingUp = false; | - |
TModelBase | __sleep | * name of the spot e.g. spota.
*
* @var string | return array('viewTemplate', 'aModuleConfig', 'sModuleSpotName'); | - |
TModelBase | __construct | * @var bool | null | - |
TModelBase | __get | * the data that will be available to module template views.
*
* @var array | if ('global' === $name) {
@trigger_error('The property TModelBase::$global is deprecated.', E_USER_DEPRECATED);
return ServiceLocator::get('chameleon_system_core.global'); | - |
TModelBase | __set | * pointer to the controller.
*
* @var ChameleonControllerInterface
*
* @deprecated Don't use this controller. Retrieve it through \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.chameleon_controller') instead | if ('global' !== $name) {
throw new \LogicException('Invalid property: '.$name); | - |
TModelBase | __isset | * @var $bool | return 'global' === $name; | - |
TModelBase | Init | * An array of all methods from the class which may be called via http requests.
*
* @var array | null | - |
TModelBase | Execute | * this is set automatically when the class is restored from session.
*
* @var bool | $this->data['sModuleSpotName'] = $this->sModuleSpotName;
$this->data['_oModules'] = $this->getController()->moduleLoader;
$pagedef = $this->global->GetUserData('pagedef');
$this->data['pagedef'] = $pagedef;
$this->data['_pagedefType'] = 'Core';
if ($this->global->UserDataExists('_pagedefType')) {
$this->data['_pagedefType'] = $this->global->GetUserData('_pagedefType'); | - |
TModelBase | AllowAccessWithoutAuthenticityToken | * if this is true (and config enables automatically wrapping of div container for spots)
* the module loader will generate a div with id="spotname" and class="moduleclass moduleview"
* by default its false - you can overwrite this explicit for each module you need.
*
* @var bool | return 'ExecuteAjaxCall' === $sMethodName; | - |
TModelBase | ExecuteAjaxCall | * this array is filled in TModuleLoader if the module was loaded from cache
* if it is null, you should call $this->_GetCacheTableInfos().
*
* @var array - null by default | $methodName = $this->global->GetUserData('_fnc');
if (empty($methodName)) {
if (_DEVELOPMENT_MODE) {
trigger_error('Ajax call made, but no function passed via _fnc', E_USER_WARNING); | - |
TModelBase | GetHtmlHeadIncludes | * @param ChameleonControllerInterface $controller
*
* @deprecated Don't use this controller. Retrieve it through \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.chameleon_controller') instead | return array(); | - |
TModelBase | GetHtmlFooterIncludes | * returns true if the class is currently waking up from the session.
*
* @return bool | return array(); | - |
TModelBase | _CallMethod | * @param string $name
*
* @return object | if (true === $this->isMethodCallAllowed($sMethodName)) {
$functionResult = call_user_func_array(array($this, $sMethodName), $aMethodParameter);
return $functionResult; | - |
TModelBase | _GetModuleRootPath | * @param string $name
* @param mixed $value | $rootPath = PATH_MODULES;
switch ($sType) {
case 'Core':
$rootPath = PATH_MODULES;
break;
case 'Custom-Core':
$rootPath = PATH_MODULES_CUSTOM;
break;
case 'Customer':
$rootPath = PATH_MODULES_CUSTOMER;
break;
default:
break; | - |
TModelBase | GetPostRenderVariables | * Called before any external functions get called, but after the constructor.
* @return void | return array(
'sModuleSpotName' => TGlobal::OutHTML($this->sModuleSpotName),
); | - |
TModelBase | _AllowCache | * this function should fill the data array and return a pointer to it
* (pointer because it may contain objects).
*
* @deprecated - use a mapper instead (see getMapper)
*
* @return array<string, mixed> | return false; | - |
TModelBase | _GetCacheParameters | * return true if the method is white-listed for access without Authenticity token. Note: you will still need
* to define the permitted methods via DefineInterface.
*
* @param string $sMethodName
*
* @return bool | $parameters = $this->aModuleConfig;
$parameters['_class'] = __CLASS__;
return $parameters; | - |
TModelBase | _GetCacheTableInfos | * @return void | return array(); | - |
TModelBase | IsHTMLDivWrappingAllowed | * Run a method within the module, but as an ajax call (no module will be used
* and the function will output jason encoded data). The method assumes that
* the name of the function that you want to execute is in the parameter _fnc.
* Also note that the function being called needs to be included in $this->methodCallAllowed
* You can control how the data will be encoded using the sOutputMode. | return $this->bAllowHTMLDivWrapping; | - |
TModelBase | InjectVirtualModuleSpots | * returns an array holding the required style, js, and other info for the
* module that needs to be loaded in the document head. each include should
* be one element of the array, and should be formated exactly as it would
* by another module that requires the same data (so it is not loaded twice).
* the function will be called for every module on the page AUTOMATICALLY by
* the controller (the controller will replace the tag "<!--#CMSHEADERCODE#-->" with
* the results).
*
* @return string[] | null | - |
TModelBase | __invoke | * returns an array holding the required js, html snippets, and other info for the
* module that needs to be loaded in the document footer (before the ending </body> Tag).
* Each include should be one element of the array, and should be formated exactly as it
* would by another module that requires the same data (so it is not loaded twice).
* the function will be called for every module on the page AUTOMATICALLY by
* the controller (the controller will replace the tag "<!--#CMSFOOTERCODE#-->" with
* the results).
*
* @return string[] | $response = new Response();
if (true === $this->_AllowCache()) {
$cache = $this->getCache();
$cacheKey = $cache->getKey($this->_GetCacheParameters());
$cachedContent = $cache->get($cacheKey);
if (null !== $cachedContent) {
$response->setContent($cachedContent);
return $this->injectPostRenderVariables($response); | - |
TModelBase | __toString | * sends module output as plaintext
* it`s possible to set a callback function via GET/POST 'callback' as wrapper.
*
* @param string $content
* @param bool $bPreventPreOutputInjection - disable the pre output variable injection (messages, vars, authenticity token...) | return get_class($this); | - |
TModuleLoader | __construct(
RequestStack $requestStack,
ModuleResolverInterface $moduleResolver,
IViewPathManager $viewPathManager,
CacheInterface $cache,
TGlobalBase $global,
ModuleExecutionStrategyInterface $moduleExecutionStrategy,
RequestInfoServiceInterface $requestInfoService
) | * loads CMS backend modules.
/* | $this->requestStack = $requestStack;
$this->moduleResolver = $moduleResolver;
$this->viewPathManager = $viewPathManager;
$this->cache = $cache;
$this->global = $global;
$this->moduleExecutionStrategy = $moduleExecutionStrategy;
$this->requestInfoService = $requestInfoService; | - |
TModuleLoader | getModuleCacheKeyDetails | * @var TModelBase[] | return isset($this->aModuleCacheData[$sSpotName]['aKey']) ? $this->aModuleCacheData[$sSpotName]['aKey'] : null; | - |
TModuleLoader | getModuleCacheTriggerDetails | * @var ChameleonControllerInterface | return isset($this->aModuleCacheData[$sSpotName]['aTrigger']) ? $this->aModuleCacheData[$sSpotName]['aTrigger'] : null; | - |
TModuleLoader | allowCacheForModule | * @var bool | return isset($this->aModuleCacheData[$sSpotName]['bAllowCaching']) ? $this->aModuleCacheData[$sSpotName]['bAllowCaching'] : false; | - |
TModuleLoader | SetEnableAutoFlush | * @var array | $this->bEnableAutoFlush = $bEnableAutoFlush; | - |
TModuleLoader | LoadModules | * @var RequestStack | $this->modules = [];
foreach ($moduleList as $name => $config) {
// @TODO: check if the class is a descendant of TModelBase
$this->modules[$name] = $this->_SetModuleConfigData($name, $config, $templateLanguage); | - |
TModuleLoader | InitModules | * @var ModuleResolverInterface | reset($this->modules);
foreach ($this->modules as $spotName => $module) {
if (null === $initSpotName || $initSpotName === $spotName) {
$oldModulePointer = $this->global->GetExecutingModulePointer();
if (false === is_object($this->modules[$spotName]) || false === method_exists($this->modules[$spotName], 'Init')) {
continue; | - |
TModuleLoader | GetPermittedFunctions | * @var CacheInterface | reset($this->modules);
$aFunctions = array();
foreach ($this->modules as $spotName => $module) {
$aTmpFunctions = $this->modules[$spotName]->methodCallAllowed;
$aFunctions = array_merge($aFunctions, $aTmpFunctions); | - |
TModuleLoader | GetHtmlHeadIncludes | * @var IViewPathManager | $aHeadData = array();
reset($this->modules);
foreach ($this->modules as $spotName => $module) {
$aModulHeadData = $this->modules[$spotName]->GetHtmlHeadIncludes();
$aHeadData = array_merge($aHeadData, $aModulHeadData); | - |
TModuleLoader | GetHtmlFooterIncludes | * @var TGlobalBase | reset($this->modules);
$aFooterData = array();
foreach ($this->modules as $spotName => $module) {
$aModuleFooterData = $this->modules[$spotName]->GetHtmlFooterIncludes();
$aFooterData = array_merge($aFooterData, $aModuleFooterData); | - |
TModuleLoader | hasModule | * @var ModuleExecutionStrategyInterface | return array_key_exists($spotName, $this->modules); | - |
TModuleLoader | GetModule | * @var RequestInfoServiceInterface | if (!isset($this->modules[$spotName])) {
$sContent = _DEVELOPMENT_MODE ? "<!-- ERROR: unable to find module [{$spotName | - |
TModuleLoader | getModuleESIPath | * @param string $sSpotName
*
* @return mixed|null | $request = $this->requestStack->getCurrentRequest();
$sBaseUrl = $request->getPathInfo();
if ('/' === substr($sBaseUrl, -1)) {
$sBaseUrl = substr($sBaseUrl, 0, -1); | - |
TModuleLoader | CallModuleFunction | * @param string $sSpotName
*
* @return mixed|null | if (array_key_exists($sSpotName, $this->modules) && method_exists($this->modules[$sSpotName], $sFunctionName)) {
echo $this->modules[$sSpotName]->$sFunctionName(); | - |
TModuleLoader | CallPublicModuleFunction | * @param string $sSpotName
*
* @return mixed|bool | if (array_key_exists($sModuleSpotName, $this->modules)) { // module exists
if (method_exists($this->modules[$sModuleSpotName], $sMethod)) { // method exists
if (in_array($sMethod, $this->modules[$sModuleSpotName]->methodCallAllowed)) { // method is in array so it´s allowed to execute it
$this->modules[$sModuleSpotName]->$sMethod(); | - |
TModuleLoader | GetPointerToModule | * @param bool $bEnableAutoFlush | if (array_key_exists($sModuleSpotName, $this->modules)) {
return $this->modules[$sModuleSpotName]; | - |
TModuleLoader | GetModulesOfType | * creates and stores all models listed by name in the moduleList parameter.
* For each model it sets the view also passed via the moduleList parameter.
*
* @param array $moduleList
* @param string|null $templateLanguage | $pointerArray = array();
foreach ($this->modules as $moduleKey => $module) {
if (is_subclass_of($this->modules[$moduleKey], $type) || 0 == strcasecmp(get_class($this->modules[$moduleKey]), $type)) {
$pointerArray[] = $this->modules[$moduleKey]; | - |
TModuleLoader | setController | * create an instance of the requested Module and initialize it using the config data.
*
* @param string $name name of the module "spot" (name from the pagedef)
* @param array $config
* @param string|null $templateLanguage
*
* @return TModelBase | $this->controller = $controller; | - |
TUserCustomModelBaseCore | GenerateModuleNavigation | * add your custom methods as array to $this->methodCallAllowed here
* to allow them to be called from web.
*
* @return void | $this->data['sModuleNavigation'] = ''; | - |
TUserModelBaseCore | __sleep | * all user modules need to be derived from this class, or one of its children.
/* | $aSleep = parent::__sleep();
$aSleep[] = 'instanceID';
return $aSleep; | - |
TUserModelBaseCore | Execute | * holds the instance id of the module (points to a record in the table cms_tpl_module_instance).
*
* @var string|null | parent::Execute();
$this->data['instanceID'] = $this->instanceID;
$this->data['oActivePage'] = $this->getActivePageService()->getActivePage();
$this->data['templateLanguage'] = $this->templateLanguage;
return $this->data; | - |
TUserModelBaseCore | _GetCacheParameters | * holds the language shortname of the template (example: de, en, ...).
*
* @var string|null | $parameters = parent::_GetCacheParameters();
$parameters['sInstanceId'] = $this->instanceID;
return $parameters; | - |
TUserModelBaseCore | SetCacheTableInfos | * @return array<string, mixed> | null | - |
TCMRenderMediaTreeSelectBox | GetTreeOptions | * if set to true, the class should show only folders writable to the user
* how this is implemented is decided by extensions of this cllas.
*
* @var bool | $this->selectedID = $selectedID;
$this->bShowOnlyWritableFolders = $bShowOnlyWritableFolders;
$this->RenderMediaTree();
return $this->treeHTML; | - |
TCMRenderMediaTreeSelectBox | AddTree | * render selectbox for the tree.
*
* @param int $selectedID
* @param bool $bShowOnlyWritableFolders
*
* @return string | $oNode = new TCMSRecord();
/** @var $oNode TCMSRecord */
$oNode->table = 'cms_media_tree';
$level = 1;
$levelDirectoryName = '';
if ($oNode->Load($iTreeId)) {
$paddingString = ' ';
if ($level > 0) {
$paddingString = str_repeat(' ', $level); | - |
TCMSMail | setTools | * a mail wrapper to send mails using the template engine. | $this->oTools = $oTools; | - |
TCMSMail | SetSubject | * @var string|null | $sSubject = $this->FilterLineFeeds($sSubject);
if (CHAMELEON_EMAIL_ENCODING != 'UTF-8') {
$sSubject = utf8_decode($sSubject); | - |
TCMSMail | SetTemplates | * @var string|null | $this->iTemplateType = self::TEMPLATETYPE_MODULE;
$this->sModuleName = $sModuleName;
$sHTMLTemplate = trim($sHTMLTemplate);
$sTextTemplate = trim($sTextTemplate);
if (empty($sHTMLTemplate)) {
$sHTMLTemplate = null; | - |
TCMSMail | SetObjectTemplate | * @var string|null | $this->iTemplateType = self::TEMPLATETYPE_OBJECT;
$this->aObjectTemplateData['sSubType'] = $sSubType;
$this->aObjectTemplateData['sType'] = $sType;
$sHTMLTemplate = trim($sHTMLTemplate);
$sTextTemplate = trim($sTextTemplate);
if (empty($sHTMLTemplate)) {
$sHTMLTemplate = null; | - |
TCMSMail | SetPackageObjectTemplate | * @var array | $this->SetObjectTemplate($sSubType, $sType, $sHTMLTemplate, $sTextTemplate);
$this->iTemplateType = self::TEMPLATETYPE_PACKAGEOBJECT; | - |
TCMSMail | Send | * @var int | $bFoundBody = $this->prepareMailData($aData);
$wasSent = false;
if ($bFoundBody) {
$mailPeerSecurity = $this->getMailPeerSecurity();
$this->SMTPOptions['ssl']['verify_peer'] = $mailPeerSecurity->isVerifyPeer();
$this->SMTPOptions['ssl']['verify_peer_name'] = $mailPeerSecurity->isVerifyPeerName();
$this->SMTPOptions['ssl']['allow_self_signed'] = $mailPeerSecurity->isAllowSelfSigned();
$this->SetSMTPLogin();
$wasSent = parent::send();
if (false == $wasSent) {
TTools::WriteLogEntry('Error sending mail "'.$this->Subject.'" to ['.print_r($this->to, true).']:'.print_r($this->ErrorInfo, true), 1, __FILE__, __LINE__); | - |
TCMSMail | SetFromData | * @var string | $this->From = $sMail;
$this->FromName = $sName;
$this->ReplyTo = array();
$this->addReplyTo($sMail, $sName); | - |
TCMSMail | setTransformationService | * @var TTools | $this->transformationService = $transformationService; | - |
TCMSMail | setMailPeerSecurity | * @var HttpsContextInterface | $this->mailPeerSecurity = $mailPeerSecurity; | - |
TCMSMail | setSmtpHost | * @var TransformOutgoingMailTargetsServiceInterface | $port = 25;
if (false !== ($portPosition = \mb_strrpos($smtpHost, ':'))) {
$portInHost = \mb_substr($smtpHost, $portPosition + 1);
if (true === \is_numeric($portInHost)) {
$port = (int) $portInHost;
$smtpHost = \mb_substr($smtpHost, 0, $portPosition); | - |
TCMSMail | setSmtpUser | * @var string | $this->smtpUser = $smtpUser; | - |