PHP Класс Backend\Modules\Extensions\Engine\Model

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

buildTemplateHTML() публичный статический метод

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?
Результат string

checkSettings() публичный статический метод

Checks the settings and optionally returns an array with warnings
public static checkSettings ( ) : array
Результат array

clearCache() публичный статический метод

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

createTemplateXmlForExport() публичный статический метод

Create template XML for export
public static createTemplateXmlForExport ( string $theme ) : string
$theme string
Результат string

deleteTemplate() публичный статический метод

Delete a template.
public static deleteTemplate ( integer $id ) : boolean
$id integer The id of the template to delete.
Результат boolean

existsModule() публичный статический метод

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.
Результат boolean

existsTemplate() публичный статический метод

Check if a template exists
public static existsTemplate ( integer $id ) : boolean
$id integer The Id of the template to check for existence.
Результат boolean

existsTheme() публичный статический метод

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.
Результат boolean

getExtras() публичный статический метод

Get extras
public static getExtras ( ) : array
Результат array

getExtrasData() публичный статический метод

Get all the available extra's
public static getExtrasData ( ) : array
Результат array

getModuleInformation() публичный статический метод

Fetch the module information from the info.xml file.
public static getModuleInformation ( string $module ) : array
$module string
Результат array

getModules() публичный статический метод

If a module contains a info.xml it will be parsed.
public static getModules ( ) : array
Результат array

getModulesThatRequireAkismet() публичный статический метод

Fetch the list of modules that require Akismet API key
public static getModulesThatRequireAkismet ( ) : array
Результат array

getModulesThatRequireGoogleMaps() публичный статический метод

Fetch the list of modules that require Google Maps API key
public static getModulesThatRequireGoogleMaps ( ) : array
Результат array

getTemplate() публичный статический метод

Get a given template
public static getTemplate ( integer $id ) : array
$id integer The id of the requested template.
Результат array

getTemplates() публичный статический метод

Get templates
public static getTemplates ( string $theme = null ) : array
$theme string The theme we want to fetch the templates from.
Результат array

getThemes() публичный статический метод

Fetch the list of available themes
public static getThemes ( ) : array
Результат array

hasModuleWarnings() публичный статический метод

Checks if a specific module has errors or not
public static hasModuleWarnings ( string $module ) : string
$module string
Результат string

insertTemplate() публичный статический метод

Inserts a new template
public static insertTemplate ( array $template ) : integer
$template array The data for the template to insert.
Результат integer

installModule() публичный статический метод

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

installTheme() публичный статический метод

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

isModuleInstalled() публичный статический метод

Checks if a module is already installed.
public static isModuleInstalled ( string $module ) : boolean
$module string
Результат boolean

isTemplateInUse() публичный статический метод

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.
Результат boolean

isThemeInstalled() публичный статический метод

Checks if a theme is already installed.
public static isThemeInstalled ( string $theme ) : boolean
$theme string
Результат boolean

isWritable() публичный статический метод

The default is_writable function has problems due to Windows ACLs "bug"
public static isWritable ( string $path ) : boolean
$path string The path to check.
Результат boolean

processModuleXml() публичный статический метод

Process the module's information XML and return an array with the information.
public static processModuleXml ( SimpleXMLElement $xml ) : array
$xml SimpleXMLElement
Результат array

processThemeXml() публичный статический метод

Process the theme's information XML and return an array with the information.
public static processThemeXml ( SimpleXMLElement $xml ) : array
$xml SimpleXMLElement
Результат array

templateSyntaxToArray() публичный статический метод

Convert the template syntax into an array to work with.
public static templateSyntaxToArray ( string $syntax ) : array
$syntax string
Результат array

updateTemplate() публичный статический метод

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

validateThemeInformation() публичный статический метод

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.
Результат array