PHP Class Backend\Modules\Extensions\Engine\Model

Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
buildTemplateHTML ( array $format, boolean $large = false ) : string Build HTML for a template (visual representation)
checkSettings ( ) : array Checks the settings and optionally returns an array with warnings
clearCache ( ) Clear all applications cache.
createTemplateXmlForExport ( string $theme ) : string Create template XML for export
deleteTemplate ( integer $id ) : boolean Delete a template.
existsModule ( string $module ) : boolean Does this module exist.
existsTemplate ( integer $id ) : boolean Check if a template exists
existsTheme ( string $theme ) : boolean Does this template exist.
getExtras ( ) : array Get extras
getExtrasData ( ) : array Get all the available extra's
getModuleInformation ( string $module ) : array Fetch the module information from the info.xml file.
getModules ( ) : array Get modules based on the directory listing in the backend application.
getModulesThatRequireAkismet ( ) : array Fetch the list of modules that require Akismet API key
getModulesThatRequireGoogleMaps ( ) : array Fetch the list of modules that require Google Maps API key
getTemplate ( integer $id ) : array Get a given template
getTemplates ( string $theme = null ) : array Get templates
getThemes ( ) : array Fetch the list of available themes
hasModuleWarnings ( string $module ) : string Checks if a specific module has errors or not
insertTemplate ( array $template ) : integer Inserts a new template
installModule ( string $module ) Install a module.
installTheme ( string $theme ) Install a theme.
isModuleInstalled ( string $module ) : boolean Checks if a module is already installed.
isTemplateInUse ( integer $templateId ) : boolean Is the provided template id in use by active versions of pages?
isThemeInstalled ( string $theme ) : boolean Checks if a theme is already installed.
isWritable ( string $path ) : boolean Check if a directory is writable.
processModuleXml ( SimpleXMLElement $xml ) : array Process the module's information XML and return an array with the information.
processThemeXml ( SimpleXMLElement $xml ) : array Process the theme's information XML and return an array with the information.
templateSyntaxToArray ( string $syntax ) : array Convert the template syntax into an array to work with.
updateTemplate ( array $item ) Update a template
validateThemeInformation ( array $information ) : array Make sure that we have an entirely valid theme information array

Method Details

buildTemplateHTML() public static méthode

Build HTML for a template (visual representation)
public static buildTemplateHTML ( array $format, boolean $large = false ) : string
$format array The template format.
$large boolean Will the HTML be used in a large version?
Résultat string

checkSettings() public static méthode

Checks the settings and optionally returns an array with warnings
public static checkSettings ( ) : array
Résultat array

clearCache() public static méthode

Note: we do not need to rebuild anything, the core will do this when noticing the cache files are missing.
public static clearCache ( )

createTemplateXmlForExport() public static méthode

Create template XML for export
public static createTemplateXmlForExport ( string $theme ) : string
$theme string
Résultat string

deleteTemplate() public static méthode

Delete a template.
public static deleteTemplate ( integer $id ) : boolean
$id integer The id of the template to delete.
Résultat boolean

existsModule() public static méthode

This does not check for existence in the database but on the filesystem.
public static existsModule ( string $module ) : boolean
$module string Module to check for existence.
Résultat boolean

existsTemplate() public static méthode

Check if a template exists
public static existsTemplate ( integer $id ) : boolean
$id integer The Id of the template to check for existence.
Résultat boolean

existsTheme() public static méthode

This does not check for existence in the database but on the filesystem.
public static existsTheme ( string $theme ) : boolean
$theme string Theme to check for existence.
Résultat boolean

getExtras() public static méthode

Get extras
public static getExtras ( ) : array
Résultat array

getExtrasData() public static méthode

Get all the available extra's
public static getExtrasData ( ) : array
Résultat array

getModuleInformation() public static méthode

Fetch the module information from the info.xml file.
public static getModuleInformation ( string $module ) : array
$module string
Résultat array

getModules() public static méthode

If a module contains a info.xml it will be parsed.
public static getModules ( ) : array
Résultat array

getModulesThatRequireAkismet() public static méthode

Fetch the list of modules that require Akismet API key
public static getModulesThatRequireAkismet ( ) : array
Résultat array

getModulesThatRequireGoogleMaps() public static méthode

Fetch the list of modules that require Google Maps API key
public static getModulesThatRequireGoogleMaps ( ) : array
Résultat array

getTemplate() public static méthode

Get a given template
public static getTemplate ( integer $id ) : array
$id integer The id of the requested template.
Résultat array

getTemplates() public static méthode

Get templates
public static getTemplates ( string $theme = null ) : array
$theme string The theme we want to fetch the templates from.
Résultat array

getThemes() public static méthode

Fetch the list of available themes
public static getThemes ( ) : array
Résultat array

hasModuleWarnings() public static méthode

Checks if a specific module has errors or not
public static hasModuleWarnings ( string $module ) : string
$module string
Résultat string

insertTemplate() public static méthode

Inserts a new template
public static insertTemplate ( array $template ) : integer
$template array The data for the template to insert.
Résultat integer

installModule() public static méthode

Install a module.
public static installModule ( string $module )
$module string The name of the module to be installed.

installTheme() public static méthode

Install a theme.
public static installTheme ( string $theme )
$theme string The name of the theme to be installed.

isModuleInstalled() public static méthode

Checks if a module is already installed.
public static isModuleInstalled ( string $module ) : boolean
$module string
Résultat boolean

isTemplateInUse() public static méthode

Is the provided template id in use by active versions of pages?
public static isTemplateInUse ( integer $templateId ) : boolean
$templateId integer The id of the template to check.
Résultat boolean

isThemeInstalled() public static méthode

Checks if a theme is already installed.
public static isThemeInstalled ( string $theme ) : boolean
$theme string
Résultat boolean

isWritable() public static méthode

The default is_writable function has problems due to Windows ACLs "bug"
public static isWritable ( string $path ) : boolean
$path string The path to check.
Résultat boolean

processModuleXml() public static méthode

Process the module's information XML and return an array with the information.
public static processModuleXml ( SimpleXMLElement $xml ) : array
$xml SimpleXMLElement
Résultat array

processThemeXml() public static méthode

Process the theme's information XML and return an array with the information.
public static processThemeXml ( SimpleXMLElement $xml ) : array
$xml SimpleXMLElement
Résultat array

templateSyntaxToArray() public static méthode

Convert the template syntax into an array to work with.
public static templateSyntaxToArray ( string $syntax ) : array
$syntax string
Résultat array

updateTemplate() public static méthode

Update a template
public static updateTemplate ( array $item )
$item array The new data for the template.

validateThemeInformation() public static méthode

Make sure that we have an entirely valid theme information array
public static validateThemeInformation ( array $information ) : array
$information array Contains the parsed theme info.xml data.
Résultat array