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 |
|---|---|---|---|---|
TCMSContentBoxItem | DrawBoxHeader | * holds one Menu (category) for the CMS, including icon, title, and menu items.
*
* @deprecated since 6.3.0 - only used for deprecated classic main menu
/* | TCMSRender::DrawBoxHeader($this->sqlData['name'], ''); | - |
TCMSContentBoxItem | DrawBoxFooter | * menu items iterator of TCMSMenuItem.
*
* @var TIterator | TCMSRender::DrawBoxFooter(); | - |
TCMSContentBoxItem | loadMenuItems | * Draw the menu header (outputs HTML). | if (!is_null($this->id)) {
/** @var SecurityHelperAccess $securityHelper */
$securityHelper = ServiceLocator::get(SecurityHelperAccess::class);
if (false === $securityHelper->isGranted(CmsUserRoleConstants::CMS_USER)) {
return ; | - |
TCMSDivision | GetDivisionNode | * returns a pointer to the page division.
*
* @param TCMSPage $oPage
*
* @return TdbCmsDivision|null | $oNode = new TCMSTreeNode();
$oNode->Load($this->sqlData['cms_tree_id_tree']);
return $oNode; | - |
TCMSDocumentManagerTreeNode | __construct | * children of node.
*
* @var TdbCmsDocumentTreeList | parent::__construct($id, 'cms_document_tree'); | - |
TCMSDocumentManagerTreeNode | TCMSDocumentManagerTreeNode | * @deprecated Named constructors are deprecated and will be removed with PHP8. When calling from a parent, please use `parent::__construct` instead.
* @see self::__construct | $this->callConstructorAndLogDeprecation(func_get_args()); | - |
TCMSDocumentManagerTreeNode | GetChildren | * {@inheritdoc} | if (null !== $this->oChildren) {
return $this->oChildren; | - |
TCMSDocumentSecurityHash | isValidTimeSpan | * @return bool | $bValid = false;
$iPublishTime = strtotime($this->fieldPublishdate);
$iEndTime = strtotime($this->fieldEnddate);
$iCurrentTime = time();
if ($iCurrentTime > $iPublishTime && $iCurrentTime < $iEndTime) {
$bValid = true; | - |
TCMSDocumentSecurityHash | isValidForExtranetUser | * if no extranet user is given current user is loaded.
*
* @param TdbDataExtranetUser|null $oExtranetUser
*
* @return bool | $bValid = false;
if (null === $oExtranetUser) {
$oExtranetUser = TdbDataExtranetUser::GetInstance(); | - |
TCMSDocumentSecurityHash | isValid | * calls isValidForExtranetUser and isValidTimeSpan
* if no extranet user is given current user is loaded.
*
* @param TdbDataExtranetUser|null $oExtranetUser
*
* @return bool | $bIsValid = $this->isValidTimeSpan();
if ($bIsValid) {
$bIsValid = $this->isValidForExtranetUser($oExtranetUser); | - |
TCMSDownloadFileEndPoint | __construct | * SEO filename used in outbox folder for symlinks.
*
* @var string|null | parent::__construct('cms_document', $id); | - |
TCMSDownloadFileEndPoint | TCMSDownloadFileEndPoint | * full SEO URL path to symlink in outbox folder.
*
* @var string|null | $this->callConstructorAndLogDeprecation(func_get_args()); | - |
TCMSDownloadFileEndPoint | GetRealPath | * @deprecated Named constructors are deprecated and will be removed with PHP8. When calling from a parent, please use `parent::__construct` instead.
* @see self::__construct | return PATH_CMS_CUSTOMER_DATA.'/'.$this->GetRealFileName(); | - |
TCMSDownloadFileEndPoint | GetRealFileName | * returns the real file path on the server to the file.
*
* @return string | $oFileType = $this->GetFileType();
return $this->id.'.'.$oFileType->sqlData['file_extension']; | - |
TCMSDownloadFileEndPoint | GetTargetFileName | * returns the name of the file on the server.
*
* @return string | if ('' == $this->sqlData['seo_name'] || $bForceNewSeoName) {
$oFileType = $this->GetFileType();
$sFileName = $this->sqlData['filename'];
if (defined('CHAMELEON_ENABLE_ID_SUFFIX_IN_DOWNLOAD_FILENAMES') && CHAMELEON_ENABLE_ID_SUFFIX_IN_DOWNLOAD_FILENAMES) {
$sFileName .= '_'.$this->sqlData['cmsident']; | - |
TCMSDownloadFileEndPoint | CreatePublicSymLink | * returns sanitized SEO filename.
*
* @param bool $bForceNewSeoName
*
* @return string | $filemanager = $this->getFileManager();
$fullPath = PATH_OUTBOX.'/public/'.$this->sqlData['cms_document_tree_id'].'/';
if (!is_dir($fullPath)) {
$filemanager->mkdir($fullPath, 0777, true); | - |
TCMSDownloadFileEndPoint | RemovePublicSymLink | * creates a public readable and reusable symlink. | $oImageType = $this->GetFileType();
if ($oImageType) {
$symLink = PATH_OUTBOX.'/public/'.$this->sqlData['cms_document_tree_id'].'/'.$this->GetTargetFileName();
if (file_exists($symLink)) {
$this->getFileManager()->unlink($symLink); | - |
TCMSDownloadFileEndPoint | GetFileType | * deletes a public symlink. | if (!array_key_exists('oFileType', $this->_cacheParameter)) {
$this->_cacheParameter['oFileType'] = null;
if (array_key_exists('cms_filetype_id', $this->sqlData) && !empty($this->sqlData['cms_filetype_id'])) {
$this->_cacheParameter['oFileType'] = TdbCmsFiletype::GetNewInstance($this->sqlData['cms_filetype_id']); | - |
TCMSDownloadFileEndPoint | getDownloadHtmlTag(
bool $isWysiwygBackendLink = false,
bool $hideName = false,
bool $hideSize = false,
bool $hideIcon = false,
string $downloadLinkName = ''): string | * returns the filetype of the download.
*
* @return TdbCmsFiletype | if (array_key_exists('downloadHtmlTag', $this->_cacheParameter)) {
return $this->_cacheParameter['downloadHtmlTag']; | - |
TCMSDownloadFileEndPoint | GetWysiwygDownloadLink | * Renders HTML tag of download with icon and size. | $sName = $this->GetName();
$sName = str_replace(',', '', $sName);
$sWysiwygDownloadLink = $this->id.',dl,'.$sName.',ico,kb';
return $sWysiwygDownloadLink; | - |
TCMSDownloadFileEndPoint | GetPlainDownloadLink | * Get download link for Wysiwyg editor.
*
* @return string | if (isset($this->sqlData['token_protected']) && '1' == $this->sqlData['token_protected'] && array_key_exists('sFullDownloadURL', $this->_cacheParameter)) {
unset($this->_cacheParameter['sFullDownloadURL']); | - |
TCMSDownloadFileEndPoint | getBackendDownloadLink | * returns full URL to the file.
*
* @param bool $dummyLink - prevent output of download url
* @param bool $bCreateToken - @deprecated if a download needs a token set this in database
* @param bool $bRelativeURL - if set to true, the method will return the URL as relative URl without domain e.g. /chameleon/outbox/.../filename.pdf
* @param TdbDataExtranetUser|null $oExtranetUser (you may set a specific user to get a token with user binding)
*
* @return string | $oTableConf = $this->GetTableConf();
$aParams = array();
$aParams['pagedef'] = 'tableeditor';
$aParams['id'] = $this->id;
$aParams['tableid'] = $oTableConf->id;
$aParams['module_fnc'] = array('contentmodule' => 'downloadDocument');
$aParams['callFieldMethod'] = '1';
$aParams['_noModuleFunction'] = 'true';
$aParams['asDownload'] = '0';
if (true === $bAsDownload) {
$aParams['asDownload'] = '1'; | - |
TCMSDownloadFileEndPoint | downloadDocument | * @param bool $bAsDownload if true deliver download original header. If false deliver download with streming header
*
* @return string | $sContentType = 'application/octet-stream';
$sFileName = $this->fieldFilename;
/**
* @var $oContentType TdbCmsFiletype
*/
$oFileType = $this->GetFileType();
if ($oFileType) {
if (false === $bAsDownload) {
$sContentType = $oFileType->fieldContentType; | - |
TCMSDownloadFileEndPoint | GetPlainFileTypeIcon | * get the download as stream or show content directly.
*
* @param bool $bAsDownload if true download as stream if false show content directly | $fileType = $this->GetFileType();
return '<span class="'.$this->getFileTypeIconCssStyle().TGlobalBase::OutHTML($fileType->sqlData['file_extension']).'"></span>'; | - |
TCMSDownloadFileEndPoint | allowDeliver | * @var $oContentType TdbCmsFiletype | $bAllowDeliver = false;
if (!TdbCmsConfig::RequestIsInBotList()) {
if (null !== $oSecurityToken) {
if ($oSecurityToken->isValidTimeSpan()) {
$bAllowDeliver = $this->hasUserRights($oSecurityToken); | - |
TCMSDownloadFileEndPoint | notAllowedDeliverHook | * @param bool $bRelativeURL
*
* @return string | if (CHAMELEON_CHECK_VALID_USER_SESSION_ON_PROTECTED_DOWNLOADS) {
throw new AccessDeniedHttpException('Access denied.'); | - |
TCMSDownloadFileEndPoint | isDeliveryCheckNeeded | * creates a token record and returns the token.
*
* @param bool $bCreateTokenWithUserBinding - off by default (adds the current user as token owner, if $oExtranetUser is given, user binding is forced)
* @param TdbDataExtranetUser|null if no user object is given the current logged in user is used instead
*
* @return string | $bNeeded = false;
if (true === $this->fieldPrivate || true === $this->fieldTokenProtected) {
$bNeeded = true; | - |
TCMSDownloadFileEndPoint | localFileExists | @var $oTableEditor TCMSTableEditor | return file_exists($this->GetRealPath()); | - |
TCMSDownloadFileEndPoint | getETag | * returns an array with post data for save in token database table.
*
* @param bool $bCreateTokenWithUserBinding
* @param TdbDataExtranetUser|null $oExtranetUser
*
* @return array | $sETag = md5(implode($this->sqlData));
return $sETag; | - |
TCMSFieldDefinition | __construct | * the field def holds a config field - this attribute is used to cache that.
*
* @var TPkgCmsStringUtilities_ReadConfig | parent::__construct('cms_field_conf', $id); | - |
TCMSFieldDefinition | TCMSFieldDefinition | * @deprecated Named constructors are deprecated and will be removed with PHP8. When calling from a parent, please use `parent::__construct` instead.
* @see self::__construct | $this->callConstructorAndLogDeprecation(func_get_args()); | - |
TCMSFieldDefinition | isVirtualField | * return a unique id for the table. you can pass either a table name, or an id.
*
* @param string $sTableNameOrTableId - either a table name or a table id
*
* @return string | $type = $this->GetFieldType();
return '' === trim($type->sqlData['mysql_type']); | - |
TCMSFieldDefinition | GetUIDForTable | @var $oTableConf TdbCmsTblConf | $sUID = '';
$sTableName = '';
if (is_numeric($sTableNameOrTableId)) {
$oTableConf = TdbCmsTblConf::GetNewInstance();
/** @var $oTableConf TdbCmsTblConf */
if (!$oTableConf->Load($sTableNameOrTableId)) {
trigger_error('Unable to find table ID ['.$sTableNameOrTableId.'] in TTools::GetUIDForTable', E_USER_ERROR); | - |
TCMSFieldDefinition | GetFieldObject | * returns the field object for the field.
*
* @return TCMSField|null | $field = null;
// check if the field defines a class that overwrites the field type class
if (!empty($this->sqlData['fieldclass'])) {
$sClassName = $this->sqlData['fieldclass'];
$field = new $sClassName(); | - |
TCMSFieldDefinition | GetFieldType | * returns the field type linked to this field definition.
*
* @return TdbCmsFieldType | $accessLayer = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.database_access_layer_cms_field_type');
return $accessLayer->getFieldType($this->sqlData['cms_field_type_id']); | - |
TCMSFieldDefinition | GetPermissionGroups | * returns an array of ids for the groups connected to this field.
*
* @return array(); | $groups = array();
$query = "SELECT * FROM `cms_field_conf_cms_usergroup_mlt` WHERE `source_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'";
$tmp = MySqlLegacySupport::getInstance()->query($query);
while ($group = MySqlLegacySupport::getInstance()->fetch_assoc($tmp)) {
$groups[] = $group['target_id']; | - |
TCMSFieldDefinition | IsCheckboxList | * static function that returns all field types that may hold an image.
*
* @return array | return 46 == $this->sqlData['cms_field_type_id']; | - |
TCMSFieldDefinition | IsPasswordField | * return true if the field is a list of checkboxes (like the mlt checkbox field).
*
* @return bool | return 23 == $this->sqlData['cms_field_type_id'] || 29 == $this->sqlData['cms_field_type_id']; | - |
TCMSFieldDefinition | GetFieldtypeConfigKey | * return true if the field is a list of checkboxes (like the mlt checkbox field).
*
* @return bool | return $this->getFieldExtraConfigObject()->getConfigValue($parameterKey); | - |
TCMSFieldDefinition | getFieldExtraConfigObject | * get field type specific config parameter value for given key.
*
* @param string $parameterKey
*
* @return string|null | if (null === $this->oCacheExtraConfigFieldObject) {
$this->oCacheExtraConfigFieldObject = new TPkgCmsStringUtilities_ReadConfig($this->sqlData['fieldtype_config']); | - |
TCMSFieldDefinition | UpdateFieldTranslationKeys | * return the extra config object (definable in the config via of the field via fieldtype_config.
*
* @return TPkgCmsStringUtilities_ReadConfig | if (null === $tableName = $this->getTableNameFromConfigId()) {
return; | - |
TCMSFieldDefinition | isTranslatable: bool | * Get array wich shows what action is required on field definition change
* for translation fields.
*
* @return array | return '1' === $this->sqlData['is_translatable']; | - |
TCMSFieldDefinition | GetRealEditFieldName | * Returns required action on field definiton change or refresh field based translation.
* Action for translation fields can be NONE, DELETE and CHANGE.
*
* @param array $aOriginalData original sql data befor field definition change
*
* @return string | $sTargetFieldName = $this->sqlData['name'];
if (false === $this->isTranslatable()) {
return $sTargetFieldName; | - |
TCMSFieldDefinition | GetEditFieldNameForLanguage | * Delete translation fields are not in given language array.
* Returns array for update logging.
*
* @param string $sTableName
* @param string $sBaseFieldName base field name without language extension
* @param array $aLanguageArray
*
* @return array | if (false === $this->isTranslatable()) {
return false; | - |
TCMSImageEndpoint | __construct | * handles images and thumbnails of table cms_media including external videos.
* | if (!is_null($id)) {
$this->Load($id); | - |
TCMSImageEndpoint | Load | * holds the sql record.
*
* @var array | $bImageLoaded = false;
$this->id = $id;
$oCmsMedia = $this->getMediaDataAccessService()->loadMediaFromId($id);
if (null !== $oCmsMedia && null !== $oCmsMedia->id && false !== $oCmsMedia->sqlData) {
if (is_array($oCmsMedia->sqlData)) {
$this->aData = $this->getFieldTranslationUtil()->copyTranslationsToDefaultFields($oCmsMedia->sqlData); | - |
TCMSImageEndpoint | GetFullURL | * id of the image.
*
* @var string | $sImageURL = '';
if ($this->IsExternalMovie()) {
$sImageURL = $this->aData['external_video_thumbnail'];
$oRequest = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
if ($oRequest->isSecure()) {
$sImageURL = str_replace('http://', 'https://', $sImageURL); | - |
TCMSImageEndpoint | GetFullLocalPath | * caches the image type (gif, jpg, png...).
*
* @var string | $sPath = $this->GetLocalMediaDirectory();
if ($this->_isThumbnail) {
$sPath = $this->GetLocalMediaDirectory(true); | - |
TCMSImageEndpoint | GetCenteredFixedSizeThumbnail | * caches the image size.
*
* @var string | $oThumb = null;
// load connected image file if one exists
if (is_array($this->aData) && array_key_exists('cms_media_id', $this->aData) && (intval($this->aData['cms_media_id']) >= 1000 || (!is_numeric($this->aData['cms_media_id']) && !empty($this->aData['cms_media_id']))) && $this->aData['cms_media_id'] != $this->aData['id']) {
$oPreviewImage = new TCMSImage();
$oPreviewImage->Load($this->aData['cms_media_id']);
$oThumb = $oPreviewImage->GetCenteredFixedSizeThumbnail($width, $height, $padding, $bgcolor);
$oThumb->_isThumbnail = true; | - |
TCMSImageEndpoint | GetRelativeURL | * add lightbox tag.
*
* @var bool | if (false === $this->_isThumbnail) {
$sImageURL = $this->GetImageUrlPathPrefix().$this->aData['path']; | - |
TCMSImageEndpoint | CheckAllowThumbnailing | * indicates if the image is a thumbnail object.
*
* @var bool | $allowThumbing = false;
if ($this->_isThumbnail) {
$allowThumbing = true; // do not allow thumbnailing a thumbnail because the generated path will be broken (the user should always generate a thumb from the origianl)
trigger_error('do not generate a thumb from a thumbnail. please generate the thumb from the original image only', E_USER_WARNING); | - |
TCMSImageEndpoint | GetReflectedImage | * add unsharp mask to get sharp images.
*
* @var bool | $bRenderReflectionWithImageMagick = false;
/*
if($this->UseImageMagick($rImageSource)) {
$oImageMagick = $this->GetImageMagicObject();
$sTempImage = tempnam(PATH_CMS_CUSTOMER_DATA."/tmp",'tempImageForIMagickReflection_');
imagepng($rImageSource,$sTempImage,100);
$oImageMagick->LoadImage($sTempImage,$this);
//if($oImageMagick->bUsePHPLibrary)
$bRenderReflectionWithImageMagick = true; | - |
TCMSImageEndpoint | ApplyEffectHook | * set this video as the big one, so we don`t show the zoom icon and set the width/height to 100%.
*
* @var bool | return $aEffects; | - |
TCMSImageEndpoint | GetThumbnailPointer | * a unique id to allow multiple instances of an image on the same page.
*
* @var string | $aEffects = $this->ApplyEffectHook($aEffects, $oThumb);
// now we need to resize the current image
$image_p = imagecreatetruecolor($oThumb->aData['width'], $oThumb->aData['height']);
if ($this->SupportsTransparency()) {
imagealphablending($image_p, false);
imagesavealpha($image_p, true); | - |
TCMSImageEndpoint | SupportsTransparency | * if this static property is set to true the image urls will be forced to http even on https websites.
*
* @var bool | $sFileType = $this->GetImageType();
return 'png' == $sFileType || 'gif' == $sFileType; | - |
TCMSImageEndpoint | InitThumbnailing | * create image object and load from database.
*
* @param string|null $id | $oThumb = new TCMSImage();
$oThumb->aData = $this->aData;
$oThumb->aData['width'] = 0;
$oThumb->aData['height'] = 0;
$oThumb->id = $this->id;
return $oThumb; | - |
TCMSImageEndpoint | GetRealImageSize | * create a new image from the oFile Object.
*
* @param TCMSFile $oFile
* @param string $sCmsMediaCategoryId
* @param string|null $sDescription
* @param string|null $sPreviewImageId
* @param IPkgCmsFileManager|null $filemanager
*
* @return TCMSImage | $path = $this->GetLocalMediaDirectory().$this->aData['path'];
$size = getimagesize($path);
return array('x' => $size[0], 'y' => $size[1]); | - |
TCMSImageEndpoint | GetThumbnail | @var $oEditor TCMSTableEditorManager | $oThumb = null;
// load connected image file if one exists
if ($usePreviewImage && is_array($this->aData) && array_key_exists('cms_media_id', $this->aData) && (intval($this->aData['cms_media_id']) >= 1000 || (!is_numeric($this->aData['cms_media_id']) && !empty($this->aData['cms_media_id']))) && ($this->aData['cms_media_id'] != $this->aData['id'] && !empty($this->aData['cms_media_id']))) {
$oPreviewImage = new TCMSImage();
$oPreviewImage->Load($this->aData['cms_media_id']);
$oThumb = $oPreviewImage->GetThumbnail($maxWidth, $maxHeight); | - |
TCMSImageEndpoint | GetForcedSizeThumbnail | @var $oImageObject TCMSImage | $oThumb = null;
$allowThumbing = $this->CheckAllowThumbnailing();
if ($allowThumbing) {
// determine how large the thumbnail should be
if (0 == $this->aData['width'] || 0 == $this->aData['height']) {
// fetch real size from file
$path = $this->GetLocalMediaDirectory().$this->aData['path'];
if (file_exists($path)) {
$size = getimagesize($path);
$this->aData['width'] = $size[0];
$this->aData['height'] = $size[1]; | - |
TCMSImageEndpoint | GetSquareThumbnail | * Load the image data from the database.
*
* @param int $id
*
* @return bool | return $this->GetForcedSizeThumbnail($maxThumbWidthHeight, $maxThumbWidthHeight); | - |
TCMSImageEndpoint | CheckThumbnailFileSizeLimit | * return true if ImageMagick is used for conversion.
*
* @return bool | $returnVal = false;
$iMaxFileSize = 3145728;
if ($this->UseImageMagick()) {
$iMaxFileSize = 1024 * 1024 * 10; // 10MB | - |
TCMSImageEndpoint | renderImage | * set this to true if you want image urls with http instead of https URLs
* don`t forget to reset this property after usage!
*
* @var bool $bforceNonSSLURLs
*
* @return bool - returns the current state of the static property | if (is_null($maxZoomWidth)) {
$maxZoomWidth = CMS_MAX_IMAGE_ZOOM_WIDTH; | - |
TCMSImageEndpoint | GetExternalVideoEmbedCode | * loads the imageMagick class.
*
* @return imageMagick | $sEmbedCode = $this->aData['external_embed_code'];
if (!is_int($iWidth)) {
$iWidth = $this->aData['width']; | - |
TCMSImageEndpoint | GetImageTag | @var $oConfig TCMSConfig | if (is_null($oImage)) {
$oImage = $this; | - |
TCMSImageEndpoint | GetRSSMediaXMLTags | * generates a unique id to allow multiple instances of an image on the same page. | if (!$this->_isThumbnail) {
$oThumb = $this->GetThumbnail($maxThumbWidth, $maxThumbHeight, true); | - |
TCMSImageEndpoint | getAtomMediaTag | * returns the full image path
* If you want the local path - use GetFullLocalPath() instead.
*
* @return string | if (!$this->_isThumbnail) {
$oThumb = $this->GetThumbnail($maxThumbWidth, $maxThumbHeight, true); | - |
TCMSImageEndpoint | GetImageTypeFromFile | * adds a random token to the image url to prevent caching.
*
* @param string $plainURL
*
* @return string | if (is_null($this->_imageType)) {
$path = $this->GetLocalMediaDirectory().$this->aData['path'];
$size = getimagesize($path);
$this->_imageType = null;
switch ($size[2]) {
case 1:
$this->_imageType = 'gif';
break;
case 2:
$this->_imageType = 'jpg';
break;
case 3:
$this->_imageType = 'png';
break; | - |
TCMSImageEndpoint | IsExternalMovie | * return the SEO path prefix for an image.
*
* @return string | $bIsExternalMovie = false;
if (!empty($this->aData['external_video_id'])) {
$bIsExternalMovie = true; | - |
TCMSImageEndpoint | GetImageType | * Returns the full local image directory path. If you want the URL to access the image - use GetFullURL instead.
*
* @return string | if (is_null($this->_imageType)) {
if (!empty($this->aData['external_video_id'])) {
$this->_imageType = 'mp4'; | - |
TCMSImageEndpoint | GetImageSize | * returns the part of the thumb url relative to PATH_MEDIA_LIBRARY_THUMBS.
*
* @return string | if (is_null($this->_fileSize) || 0 == $this->_fileSize) {
$path = $this->GetLocalMediaDirectory().$this->aData['path'];
$this->_fileSize = filesize($path);
$updateQuery = "UPDATE `cms_media` SET `filesize` = '".$this->_fileSize."' WHERE `id` = '".$this->id."'";
MySqlLegacySupport::getInstance()->query($updateQuery); | - |
TCMSImageEndpoint | getMediaDataAccessService | * returns the path to the media files directory.
*
* @param bool $bThumbs - set to true if you want the thumbs directory
*
* @return string | static $mediaDataAccessService;
if (null === $mediaDataAccessService) {
$mediaDataAccessService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.database_access_layer_media'); | - |
TCMSImageEndpoint | GetCMSImageTag | * creates a thumbnail of fixed size with base image centered with border.
*
* @param int $width
* @param int $height
* @param int $padding
* @param string $bgcolor - hexadecimal 0-9 a-f
* @param array $aEffects
* @param bool $bStretchImageToFullsize
*
* @return TCMSImage | $sImgTag = '';
$src = $this->GetFullURL();
if ($width >= $this->aData['width'] || $height >= $this->aData['height']) {
$sImgTag = '<img alt="'.$this->aData['description'].'" title="'.$this->aData['description'].'" cmsmedia="'.$this->id.'" cmsshowfull="0" cmsshowcaption="'.$showCaption.'" src="'.$src.'" height="'.$this->aData['height'].'" width="'.$this->aData['width'].'" />'; | - |
TCMSImageEndpoint | GetPlainFileTypeIcon | * returns the relative URL of the image e.g. /chameleon/mediapool/1.jpg.
*
* @return string | return '<span class="'.$this->getFileTypeIconCssStyle().TGlobalBase::OutHTML($this->GetImageType()).'"></span>'; | - |
TCMSImageEndpoint | ClearThumbnails | * checks if the filetype allows thumbnailing.
*
* @return bool | // delete thumbnails
$sDir = PATH_MEDIA_LIBRARY_THUMBS.$this->GetThumbPathExtension();
if (is_dir($sDir)) {
if ($handle = opendir($sDir)) {
$sPatter = '-ID'.$this->aData['cmsident'].'-';
$filemanager = self::getFileManager();
while (false !== ($file = readdir($handle))) {
//somename-XxY-IDxxx-
if (false !== strpos($file, $sPatter)) {
$filemanager->unlink($sDir.'/'.$file); | - |
TCMSImageEndpoint | __toString | * Creates an reflection effect for a given image resource.
*
* @param resource $rImageSource: The image resource (e.g. created via
* imagecreatefromjpeg)
* @param int $iPercentage: The percentage of the height of the
* original image where the reflection effect should take place. For
* example: if you put in 50 (50%) here, you'll get an mirrored reflection
* that is 50% as high as your original image. So if your original image
* was 100 pixel high - your image including mirrored reflection (which
* will be returned will now be 150 pixel. The higher the percentage,
* the longer the alpha gradient.
* @param bool $bImageline - renders a line for the
* @param int $iAlphaStart (possible values 0-126)
* @param int $iAlphaEnd (possible values 1-127)
*
* @return resource | return $this->GetImageTag(); | - |
TCmsLanguage | GetTranslatedPageURL | * Return translated page URL.
*
* @return string | $activePageService = $this->getActivePageService();
return $activePageService->getLinkToActivePageAbsolute(array(
), array(
'module_fnc' => 'pkgLanguage',
'l',
AuthenticityTokenManagerInterface::TOKEN_ID,
),
$this); | - |
TCmsLanguage | TargetLanguageSimulation | * a lot of objects use the language info stored in TCMSSmartURLData - to have these objects use
* the current language instead, we temporarily change the data in TCMSSmartURLData.
*
* @param bool $bStart | static $originalLanguageId = null;
$languageService = self::getLanguageService();
if (true === $bStart) {
$originalLanguage = $languageService->getActiveLanguage();
if (null !== $originalLanguage) {
$originalLanguageId = $originalLanguage->id; | - |
TCMSListItem | GetDetailURL | * module_list item.
*
/* | $sDetailURL = $this->getActivePageService()->getLinkToActivePageRelative(array(
'article'.$this->sqlData['cms_tpl_module_instance_id'] => $this->id,
));
return $sDetailURL; | - |
TCMSLocal | __construct | * return active local.
*
* @return TdbCmsLocals|false Only returns false if there is an initialization loop. It is not necessary to consider
* this normally, but only in code that is potentially used in request bootstrapping context (including autoclasses). | parent::__construct('cms_locals', $id, $iLanguage); | - |
TCMSLocal | InitPHPLocalSetting | * return formated number.
*
* @param float $dNumber
* @param int $dDecimals
*
* @return string | if (!empty($this->sqlData['php_local_name'])) {
$sLocalString = trim($this->sqlData['php_local_name']);
$aLocals = explode(',', $sLocalString);
// take at moste for
$maxCount = 4;
if (count($aLocals) < 4) {
$maxCount = count($aLocals); | - |
TCMSLocal | FormatNumber | * Converts string to decimal.
*
* @param string $sNumber
*
* @return float | $dLocalDecimals = $this->dNumberOfDecimals;
if (!is_null($dDecimals)) {
$dLocalDecimals = $dDecimals; | - |
TCMSLocal | StringToNumber | * format an sql style date into the current local
* Note: by using iShowDateParte you can show parts of the date. just set the bitmask using self::DATEFORMAT_SHOW_*.
*
* @example: show the full date but only the hours and minutes of the time part:
* $oLocal->FormatDate('2008-02-03 09:10:13',TCMSLocal::DATEFORMAT_SHOW_DATE | TCMSLocal::DATEFORMAT_SHOW_TIME_HOUR | TCMSLocal::DATEFORMAT_SHOW_TIME_MINUTE)
*
* @param string $sqlDateString - date of the form yyyy-mm-dd HH:MM:SS
* @param int $iShowDatePart - show which part of the date
*
* @return string | $sNumber = str_replace($this->sThousandSeperator, '', $sNumber);
$sNumber = str_replace($this->sDecimalSeperator, '.', $sNumber);
$dNumber = floatval($sNumber);
return $dNumber; | - |
TCMSLocal | FormatDate | * convert a date string in local format into an sql date.
*
* @param string $sDateString
*
* @return string | // input: YYYY-MM-DD HH:II:SS
$sqlDateString = trim($sqlDateString);
if ('0000-00-00' == $sqlDateString || '0000-00-00 00:00:00' == $sqlDateString) {
$sqlDateString = ''; | - |
TCMSLocal | StringToDate | * @return PortalDomainServiceInterface | $parts = explode(' ', $sDateString); // split into date and time
$sTimePart = '';
$sDatePart = $parts[0];
if (count($parts) > 1) {
$sTimePart = $parts[1]; | - |
TCmsMedia | GetImageNameAsSeoName | * @return MediaPathGenerator | $oType = $this->GetFieldCmsFiletype();
$extension = (null === $oType) ? '' : $oType->fieldFileExtension;
return $this->getMediaPathGenerator()->generateMediaPath($this->fieldCustomFilename, $extension, $this->id, $this->sqlData['cmsident']); | - |
TCMSMediaManagerTreeNode | __construct | * children of node.
*
* @var TdbCmsMediaTreeList | parent::__construct($id, 'cms_media_tree'); | - |
TCMSMediaManagerTreeNode | TCMSMediaManagerTreeNode | * @deprecated Named constructors are deprecated and will be removed with PHP8. When calling from a parent, please use `parent::__construct` instead.
* @see self::__construct | $this->callConstructorAndLogDeprecation(func_get_args()); | - |
TCMSMediaManagerTreeNode | GetChildren | * {@inheritdoc} | if (is_null($this->oChildren)) {
$query = "SELECT `cms_media_tree`.*
FROM `cms_media_tree`
WHERE `cms_media_tree`.`parent_id` ='".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
ORDER BY entry_sort";
$this->oChildren = TdbCmsMediaTreeList::GetList($query, $languageId); | - |
TCMSMediaManagerTreeNode | GetFilesInDirectory | * {@inheritdoc} | $oFileList = false;
if (!is_null($this->id)) {
$query = "SELECT `cms_media`.*
FROM `cms_media`
WHERE `cms_media`.`cms_media_tree_id` ='".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
";
$oFileList = TdbCmsMediaList::GetList($query); | - |
TCMSMediaManagerTreeNode | GetTextPathToNode | @var $oNode TCMSTreeNode | $sPath = '';
$oBreadCrumb = $this->GetBreadcrumb(true);
/** @var $oNode TCMSTreeNode */
while ($oNode = $oBreadCrumb->Next()) {
if (!empty($sPath)) {
$sPath .= $sSeperator; | - |
TCmsMediaTree | GetFullServerPath | * @return string | $sPath = realpath(PATH_OUTBOX_MEDIA_LIBRARY_SEO_LINKS);
$sPath = $sPath.$this->GetPathCache();
return $sPath; | - |
TCmsMediaTree | GetNodeNameAsDirName | * @return UrlNormalizationUtil | $sName = trim($this->fieldName);
$sName = $this->getUrlNormalizationUtil()->normalizeUrl($sName);
$sName = mb_strtolower($sName);
if (empty($sName)) {
$sName = '-'; | - |
TCMSModule | __construct | * holds a record from the "cms_tpl_module" table.
/* | parent::__construct('cms_module', $id); | - |
TCMSModule | TCMSModule | * @deprecated Named constructors are deprecated and will be removed with PHP8. When calling from a parent, please use `parent::__construct` instead.
* @see self::__construct | $this->callConstructorAndLogDeprecation(func_get_args()); | - |
TCMSModule | GetModuleLink | * returns the url including optional javascript for popups.
*
* @return string | $pagedefType = $this->sqlData['module_location'];
$url = PATH_CMS_CONTROLLER.'?pagedef='.urlencode($this->sqlData['module']);
if (!empty($this->sqlData['parameter'])) {
$url .= '&'.$this->sqlData['parameter']; | - |
TCMSPage | getBreadcrumb | * holds a page object.
/* | if (null !== $this->breadcrumb) {
return $this->breadcrumb; | - |
TCMSPage | getDivision | * used to cache some of the values that this function can return via functions.
*
* @var array | if (null !== $this->division) {
return $this->division; | - |
TCMSPage | GetMainTreeId | * the active division.
*
* @var TdbCmsDivision | if (!array_key_exists('mainTreeId', $this->_aDataCache)) {
$this->_aDataCache['mainTreeId'] = null;
$isSetInPageData = (is_array($this->sqlData) && array_key_exists('primary_tree_id_hidden', $this->sqlData));
if ($isSetInPageData && !empty($this->sqlData['primary_tree_id_hidden'])) {
$this->_aDataCache['mainTreeId'] = $this->sqlData['primary_tree_id_hidden']; | - |
TCMSPage | IsHomePage | * breadcrumb to the current page.
*
* @var TCMSPageBreadcrumb | $bIsHome = $this->GetFromInternalCache('bIsHomePage');
if (is_null($bIsHome)) {
$bIsHome = false;
$activePortal = self::getPortalDomainService()->getActivePortal();
if (null !== $activePortal) {
$iNode = $this->GetMainTreeId();
if ($activePortal->fieldHomeNodeId == $iNode) {
$bIsHome = true; | - |
TCMSPage | GetMainTreeName | * @return TCMSPageBreadcrumb | $sNodeName = '';
$iNode = $this->GetMainTreeId();
$oNode = self::getTreeService()->getById($iNode);
if (null !== $oNode) {
$sNodeName = $oNode->GetName(); | - |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.