PHP 클래스 Backend\Modules\Extensions\Engine\Model

파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
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