Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • 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
  • conMakeInlineScript
  • 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
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • 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
  • 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
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • 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
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cModuleHandler

Class for new modul structure.

Saves the Modul-Input in file "input.php" and Modul-Output in file "output.php". All modules of a client 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 )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

With this class you can create a new module, rename a module. You can save a Output from modules and Input in a file. The save rules are [Modulname] (is unique) the files input and output will be named [Modulname]_input.php, and [Modulname]_output.php respectivly.

Parameters

$idmod
integer
$idmod [optional] the id of the module

Throws

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

Parameters

$overrideLanguageId
integer
$overrideLanguageId [optional]

Returns

mixed
public boolean
# modulePathExistsInDirectory( string $name )

Exist the modulname in directory.

Exist the modulname in directory.

Parameters

$name
string
$name

Returns

boolean
public string|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
$templateName
$fileType
string
$fileType
$fileContent
string
$fileContent
$saveDirectory
string
$saveDirectory [optional]

Returns

string|boolean
URL on success or false on failure
public static string
# getCleanName( string $name, string $defaultChar = '_' )

Get the cleaned name.

Get the cleaned name.

Parameters

$name
string
$name mod name
$defaultChar
string
$defaultChar [optional] default character

Returns

string
public
# initWithDatabaseRow( mixed $db )

Init the vars of the class.

Init the vars of the class.

Parameters

$db
mixed
$db
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 [optional] the id of the modul
public string
# getModuleName( )

Get the name of module.

Get the name of module.

Returns

string
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.

Get the template path.

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

Parameters

$file
string
$file [optional]

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 boolean
# 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

Returns

boolean
public boolean
# 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

Returns

boolean
public boolean
# createModuleFile( string $type, string $fileName = NULL, string $content = '' )

Create and save new file.

Create and save new file.

Parameters

$type
string
$type css | js | template directory of the file
$fileName
string
$fileName [optional] file name
$content
string
$content [optional] content of the file

Returns

boolean
true on success or false on failure
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
true on success or false on failure
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 string|boolean
# getFilesContent( string $directory, string $fileTyp, string $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
string
$fileName [optional]

Returns

string|boolean
protected boolean
# _makeModuleDirectory( )

Make main module directory.

Make main module directory.

Returns

boolean
true on success or false on failure
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( string $name )

Set the new modul name.

Set the new modul name.

Parameters

$name
string
$name
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|boolean
# readInput( boolean $issource = false )

Read the input of the file _input.php.

Read the input of the file _input.php.

Parameters

$issource
boolean
$issource [optional]

Returns

string|boolean
content of module input file or false on failure
public boolean|string
# readOutput( boolean $issource = false )

Read the output of the file _output.php.

Read the output of the file _output.php.

Parameters

$issource
boolean
$issource [optional]

Returns

boolean|string
content of module output file or false on failure
protected boolean
# 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

Returns

boolean
true on success or false on failure
public boolean
# 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

boolean
true on success or false on failure
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
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
$output [optional]

Returns

boolean
true on success or false on failure
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
$input [optional]

Returns

boolean
true on success or false on failure
public true
# saveInfoXML( string $moduleName = NULL, string $description = NULL, string $type = NULL, string $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 [optional] name of the modul
$description
string
$description [optional] description of the modul
$type
string
$type [optional] type of the modul
$alias
string
$alias [optional]

Returns

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

Create a new module in the module dir.

Create a new module in the module dir.

The module name will be [ModuleName] example Contact_Form or GoogleMaps2.

Parameters

$input
string
$input [optional]
$output
string
$output [optional]

Returns

boolean
if module 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 on success or false on failure
public boolean
# 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.

Returns

boolean
if the modul exist return true, else false
public array
# testInput( )

Test input code.

Test input code.

Returns

array
bool state, string errorMessage
public array
# testOutput( )

Test output code.

Test output code.

Returns

array
bool state, string errorMessage
protected array
# _testCode( string $inputType )

Test module code.

Test module code.

Parameters

$inputType
string
$inputType code field type, 'input' or 'output'

Returns

array
bool state, string errorMessage
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
$output [optional] 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 alias name of the modul.

The alias 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...)

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.11 API documentation generated by ApiGen 2.8.0