Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • _processCmsTags
  • addArtspec
  • addslashes_deep
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • endsWith
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAktuellType
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileContents
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParam
  • getParentAreaId
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • modTestModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • putFileContents
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setHelpContext
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • stripslashes_deep
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • xmlFileToArray
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cModuleHandler

Class for new modul structere. Saves the Modul-Input in a file (input.php) and Modul-Output in a file(output.php). All moduls of a clients are in [frontend]/modules/.

Direct known subclasses

cModuleFileTranslation, cModuleSearch, cModuleSynchronizer, cModuleTemplateHandler
Package: Core\Backend
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Rusmir Jusufovic
Located at classes/module/class.module.handler.php
Methods summary
public
# __construct( integer $idmod = NULL )

Construct for the class cModuleHandler. With this class you can make a new Modul, rename a Modul. You can save a Output from Modul and Input in a file. The save rules are [Modulname] (is uneque) the files input and output will be named [Modulname]_input.php , [Modulname]_output.php

Construct for the class cModuleHandler. With this class you can make a new Modul, rename a Modul. You can save a Output from Modul and Input in a file. The save rules are [Modulname] (is uneque) the files input and output will be named [Modulname]_input.php , [Modulname]_output.php

Parameters

$idmod
integer
$idmod the id of the modul

Throws

cException
if the module directory can not be created
public static
# getEncoding( mixed $overrideLanguageId = 0 )
public
# modulePathExistsInDirectory( string $name )

Exist the modulname in directory

Exist the modulname in directory

Parameters

$name
string
$name
public boolean
# saveContentToFile( string $templateName, string $fileType, string $fileContent, string $saveDirectory = 'cache' )

Save a content in the file, use for css/js

Save a content in the file, use for css/js

Parameters

$templateName
string
$frontendPath
$fileType
string
$templateName
$fileContent
string
$fileType
$saveDirectory
string
$fileContent

Returns

boolean
string
public static
# getCleanName( string $name, string $defaultChar = '_' )

Get the cleaned name

Get the cleaned name

Parameters

$name
string
$name mod name
$defaultChar
string
$defaultChar default character
public
# initWithDatabaseRow( array $db )

Init the vars of the class.

Init the vars of the class.

Parameters

$db
array
$modulData [idmod],[name],[input],[output],[forntedpath],[client]
protected
# _initByModule( integer $idmod = NULL )

Init the vars of the class, make a query to the Db

Init the vars of the class, make a query to the Db

Parameters

$idmod
integer
$idmod the id of the modul
public string
# getModulePath( )

Get the Modul Path also cms path + module + module name.

Get the Modul Path also cms path + module + module name.

Returns

string
public string
# getTemplatePath( string $file = '' )

Get the template path. If file is set it will return the complete paht + file

Get the template path. If file is set it will return the complete paht + file

Parameters

$file
string
$file

Returns

string
public string
# getCssPath( )

Get the css path of the modul

Get the css path of the modul

Returns

string
public string
# getPhpPath( )

Get the php path of the modul

Get the php path of the modul

Returns

string
public string
# getJsPath( )

Get the js path of the modul

Get the js path of the modul

Returns

string
public string
# getCssFileName( )

Get the main css file modulenam.css

Get the main css file modulenam.css

Returns

string
protected string
# getRandomCharacters( integer $count )

Returns random characters

Returns random characters

Parameters

$count
integer
$count amount of characters

Returns

string
public
# existFile( string $type, string $fileName )

Check if exist a file

Check if exist a file

Parameters

$type
string
$type js | template | css the directory of the file
$fileName
string
$fileName file name
public
# deleteFile( string $type, string $fileName )

Delete file

Delete file

Parameters

$type
string
$type js |template | css directory of the file
$fileName
string
$fileName file name
public
# createModuleFile( string $type, string $fileName = NULL, string $content = '' )

Make and save new file

Make and save new file

Parameters

$type
string
$type css | js | template directory of the file
$fileName
string
$fileName file name
$content
string
$content content of the file
public boolean
# renameModuleFile( string $type, string $oldFileName, string $newFileName )

Rename a file

Rename a file

Parameters

$type
string
$type css | js | template directory of the file
$oldFileName
string
$oldFileName old name of the file
$newFileName
string
$newFileName the new name of the file

Returns

boolean
by success return true
public string
# getJsFileName( )

Get the name of the main js file (modulname.js)

Get the name of the main js file (modulname.js)

Returns

string
the name of the js file
public
# getFilesContent( string $directory, string $fileTyp, mixed $fileName = NULL )

Get the content of file, modul js or css or template or php

Get the content of file, modul js or css or template or php

Parameters

$directory
string
$directory where in module should we look
$fileTyp
string
$fileTyp css or js
$fileName
protected boolean
# _makeModuleDirectory( )

Make main module directory.

Make main module directory.

Returns

boolean
public array
# getAllFilesFromDirectory( string $moduleDirectory )

Get all files from a module directory

Get all files from a module directory

Parameters

$moduleDirectory
string
$moduleDirectory template css or js...

Returns

array
public
# changeModuleName( mixed $name )

Set the new modul name.

Set the new modul name.

Var

$name string
public boolean
# eraseModule( )

Removes this module from the filesystem. Also deletes the version files.

Removes this module from the filesystem. Also deletes the version files.

Returns

boolean
true on success or false on failure
public string
# readInput( mixed $issource = false )

Read the input of the file _input.php

Read the input of the file _input.php

Returns

string
Contents of the Module file (_input.php)
public string
# readOutput( mixed $issource = false )

Read the output of the file _output.php

Read the output of the file _output.php

Returns

string
Contents of the Module file( _output.php)
protected
# createModuleDirectory( string $type )

Make a directory template/css/image/js/php if not exist

Make a directory template/css/image/js/php if not exist

Parameters

$type
string
$type
public bool,
# isWritable( string $fileName, string $directory )

Can write/create a file

Can write/create a file

Parameters

$fileName
string
$fileName file name
$directory
string
$directory directory where is the file

Returns

bool,
success true else false
public boolean
# moduleWriteable( string $type )

Check write permissions for this module

Check write permissions for this module

Parameters

$type
string
$type php oder template

Returns

boolean
true or false
public boolean
# saveOutput( string $output = NULL )

Save a string into the file (_output.php).

Save a string into the file (_output.php).

Parameters

$output
string

Returns

boolean
if the action (save contents into the file _output.php is success) return true else false
public boolean
# saveInput( string $input = NULL )

Save a string into the file (_input.php)

Save a string into the file (_input.php)

Parameters

$input
string

Returns

boolean
if the action (save contents into the file _input.php is success) return true else false
public true
# saveInfoXML( string $moduleName = NULL, string $description = NULL, string $type = NULL, mixed $alias = NULL )

This method save a xml file with modul information. If the params not set, get the value from this

This method save a xml file with modul information. If the params not set, get the value from this

Parameters

$moduleName
string
$moduleName name of the modul
$description
string
$description description of the modul
$type
string
$type type of the modul
$alias

Returns

true
if success else false
public boolean
# createModule( mixed $input = '', mixed $output = '' )

Make a new module into the modul dir. The modul name will be [ModulName] example Contact_Form or GoogleMaps2.

Make a new module into the modul dir. The modul name will be [ModulName] example Contact_Form or GoogleMaps2.

Returns

boolean
if modul exist or mkdir and saveInput and saveOutput success return true. Else if the mkdir or saveInput or saveOutput not success return false.
public boolean
# renameModul( string $old, string $new )

Rename a modul and the input and output files.

Rename a modul and the input and output files.

Parameters

$old
string
$old old name of the modul
$new
string
$new new name of the modul

Returns

boolean
true if success
public
# modulePathExists( )

Show if the Modul with the modul name exist in modul dir.

Show if the Modul with the modul name exist in modul dir.

return bool if the modul exist return true, else false

public
# testInput( )
public
# testOutput( )
protected
# _testCode( mixed $inputType )
protected array
# _verifyCode( string $code, string $id, string $output = false )

Check module php code

Check module php code

Parameters

$code
string
$code Code to evaluate
$id
string
$id Unique ID for the test function
$output
string
$mode true if start in php mode, otherwise false

Returns

array
(bool state, string errorMessage)
Properties summary
private string $_modulePath
#

Path to a modul dir

Path to a modul dir

private string $_path
#

Path to the modul dir where are all the moduls of a client (frontendpath)

Path to the modul dir where are all the moduls of a client (frontendpath)

protected integer $_idmod NULL
#

Id of the Modul

Id of the Modul

private string $_moduleName NULL
#

The name of the modul

The name of the modul

protected string $_description
#

Description of the modul.

Description of the modul.

protected string $_type
#

The type of the modul.

The type of the modul.

protected string $_moduleAlias
#

The aliac name of the modul

The aliac name of the modul

protected array $_directories array( 'css' => 'css/', 'js' => 'js/', 'template' => 'template/', 'image' => 'image/', 'lang' => 'lang/', 'php' => 'php/' )
#

The names of the modul directories.

The names of the modul directories.

protected array $_cfg NULL
#

CONTENIDO cfg

CONTENIDO cfg

protected array $_cfgClient NULL
#

Contenido cfgClient

Contenido cfgClient

protected integer $_client '0'
#

id of the Client

id of the Client

protected string $_input ''
#

The code of the modul input

The code of the modul input

protected string $_output ''
#

The code of the modul output

The code of the modul output

protected string $_encoding ''
#

Encoding oft the site

Encoding oft the site

protected string $_fileEncoding ''
#

Which format of encoding should be files (input/output/translation...) getEffectiveSetting('encoding', 'file_encoding', 'UTF-8')

Which format of encoding should be files (input/output/translation...) getEffectiveSetting('encoding', 'file_encoding', 'UTF-8')

protected integer $_idlang -1
#

The id of the lang

The id of the lang

private cDb $_db NULL
#
protected static array $_encodingStore array()
#
CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0