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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

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
  • 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
  • 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
  • Todo
  • Download

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 )

Constructor for the class cModuleHandler. 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 , [Modulname]_output.php

Constructor for the class cModuleHandler. 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 , [Modulname]_output.php

Parameters

$idmod
the id of the module

Throws

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

Exist the modulname in directory

Exist the modulname in directory

Parameters

$name
$cfgClient,…
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
$frontendPath
$fileType
$templateName
$fileContent
$fileType
$saveDirectory
$fileContent

Returns

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

Get the cleaned name

Get the cleaned name

Parameters

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

Init the vars of the class.

Init the vars of the class.

Parameters

$db

$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
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 path + file

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

Parameters

$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
amount of characters

Returns

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

Check if exist a file

Check if exist a file

Parameters

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

Delete file

Delete file

Parameters

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

Create and save new file

Create and save new file

Parameters

$type
css | js | template directory of the file
$fileName
file name
$content
content of the file

Returns

boolean
true if file can be created, and false otherwise
public boolean
# renameModuleFile( string $type, string $oldFileName, string $newFileName )

Rename a file

Rename a file

Parameters

$type
css | js | template directory of the file
$oldFileName
old name of the file
$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, $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
where in module should we look
$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
template css or js...

Returns

array
public
# changeModuleName( $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( $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( $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
public bool,
# isWritable( string $fileName, string $directory )

Can write/create a file

Can write/create a file

Parameters

$fileName
file name
$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
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

Returns

boolean

if the action (save contents into the file _output.php) is successful 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

Returns

boolean

if the action (save contents into the file _input.php) is successful return true else false

public true
# saveInfoXML( string $moduleName = NULL, string $description = NULL, string $type = NULL, $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
name of the modul
$description
description of the modul
$type
type of the modul
$alias

Returns

true
if success else false
public boolean
# createModule( $input = '', $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
old name of the modul
$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( $inputType )
protected array
# _verifyCode( string $code, string $id, string $output = false )

Check module php code

Check module php code

Parameters

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

Returns

array
(bool state, string errorMessage)
protected static
# _getModulePath( )

Get method for module path value Path to a module dir

Get method for module path value Path to a module dir

Returns


$modulePath string
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

Id of the Modul

Id of the Modul

# NULL
private string $_moduleName

The name of the modul

The name of the modul

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

The names of the modul directories.

The names of the modul directories.

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

CONTENIDO cfg

CONTENIDO cfg

# NULL
protected array $_cfgClient

Contenido cfgClient

Contenido cfgClient

# NULL
protected integer $_client

id of the Client

id of the Client

# '0'
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

The id of the lang

The id of the lang

# -1
private cDb $_db
# NULL
protected static array $_encodingStore
# array()
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen