PHP 클래스 Backend\Core\Engine\Model

상속: extends Common\Core\Model
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
checkSettings ( ) : array Checks the settings and optionally returns an array with warnings
createURLForAction ( string $action = null, string $module = null, string $language = null, array $parameters = null, boolean $urlencode = true ) : string Creates an URL for a given action and module If you don't specify an action the current action will be used.
deleteExtra ( string $module = null, string $type = null, array $data = null ) Delete a page extra by module, type or data.
deleteExtraById ( integer $id, boolean $deleteBlock = false ) Delete a page extra by its id
deleteExtrasForData ( string $module, string $field, string $value, string $action = null ) Delete all extras for a certain value in the data array of that module_extra.
deleteThumbnails ( string $path, string $thumbnail ) Delete thumbnails based on the folders in the path
generateRandomString ( integer $length = 15, boolean $numeric = true, boolean $lowercase = true, boolean $uppercase = true, boolean $special = true ) : string Generate a random string
getDateFormatsLong ( ) : array Fetch the list of long date formats including examples of these formats.
getDateFormatsShort ( ) : array Fetch the list of short date formats including examples of these formats.
getExtras ( array $ids ) : array Get extras
getExtrasForData ( string $module, string $key, string $value, string $action = null ) : array Get extras for data
getKeys ( string $language = null ) : array Get the page-keys
getModulesForDropDown ( ) : array Fetch the list of modules, but for a dropdown.
getModulesOnFilesystem ( boolean $includeCore = true ) : array Get the modules that are available on the filesystem
getNavigation ( string $language = null ) : array Get the navigation-items
getNumberFormats ( ) : array Fetch the list of number formats including examples of these formats.
getTimeFormats ( ) : array Fetch the list of time formats including examples of these formats.
getToken ( ) : string Get the token which will protect us
getURL ( integer $pageId, string $language = null ) : string Get URL for a given pageId
getURLForBlock ( string $module, string $action = null, string $language = null, array $data = null ) : string Get the URL for a give module & action combination
imageDelete ( string $module, string $filename, string $subDirectory = '', array $fileSizes = null ) Image Delete
insertExtra ( string $type, string $module, string $action = null, string $label = null, array $data = null, boolean $hidden = false, integer $sequence = null ) : integer Insert extra
invalidateFrontendCache ( string $module = null, string $language = null )
isModuleInstalled ( string $module ) : boolean Is module installed?
ping ( string $pageOrFeedURL = null, string $category = null ) : boolean Ping the known webservices
submitHam ( string $userIp, string $userAgent, string $content, string $author = null, string $email = null, string $url = null, string $permalink = null, string $type = null, string $referrer = null, array $others = null ) : boolean Submit ham, this call is intended for the marking of false positives, things that were incorrectly marked as spam.
submitSpam ( string $userIp, string $userAgent, string $content, string $author = null, string $email = null, string $url = null, string $permalink = null, string $type = null, string $referrer = null, array $others = null ) : boolean Submit spam, his call is for submitting comments that weren't marked as spam but should have been.
updateExtra ( integer $id, string $key, string $value ) Update extra
updateExtraData ( integer $id, string $key, string $value ) Update extra data

메소드 상세

checkSettings() 공개 정적인 메소드

Checks the settings and optionally returns an array with warnings
public static checkSettings ( ) : array
리턴 array

createURLForAction() 공개 정적인 메소드

If you don't specify a module the current module will be used. If you don't specify a language the current language will be used.
public static createURLForAction ( string $action = null, string $module = null, string $language = null, array $parameters = null, boolean $urlencode = true ) : string
$action string The action to build the URL for.
$module string The module to build the URL for.
$language string The language to use, if not provided we will use the working language.
$parameters array GET-parameters to use.
$urlencode boolean Should the parameters be urlencoded?
리턴 string

deleteExtra() 공개 정적인 메소드

Data is a key/value array. Example: array(id => 23, language => nl);
public static deleteExtra ( string $module = null, string $type = null, array $data = null )
$module string The module wherefore the extra exists.
$type string The type of extra, possible values are block, homepage, widget.
$data array Extra data that exists.

deleteExtraById() 공개 정적인 메소드

Delete a page extra by its id
public static deleteExtraById ( integer $id, boolean $deleteBlock = false )
$id integer The id of the extra to delete.
$deleteBlock boolean Should the block be deleted? Default is false.

deleteExtrasForData() 공개 정적인 메소드

Delete all extras for a certain value in the data array of that module_extra.
public static deleteExtrasForData ( string $module, string $field, string $value, string $action = null )
$module string The module for the extra.
$field string The field of the data you want to check the value for.
$value string The value to check the field for.
$action string In case you want to search for a certain action.

deleteThumbnails() 공개 정적인 메소드

Delete thumbnails based on the folders in the path
public static deleteThumbnails ( string $path, string $thumbnail )
$path string The path wherein the thumbnail-folders exist.
$thumbnail string The filename to be deleted.

generateRandomString() 공개 정적인 메소드

Generate a random string
public static generateRandomString ( integer $length = 15, boolean $numeric = true, boolean $lowercase = true, boolean $uppercase = true, boolean $special = true ) : string
$length integer Length of random string.
$numeric boolean Use numeric characters.
$lowercase boolean Use alphanumeric lowercase characters.
$uppercase boolean Use alphanumeric uppercase characters.
$special boolean Use special characters.
리턴 string

getDateFormatsLong() 공개 정적인 메소드

Fetch the list of long date formats including examples of these formats.
public static getDateFormatsLong ( ) : array
리턴 array

getDateFormatsShort() 공개 정적인 메소드

Fetch the list of short date formats including examples of these formats.
public static getDateFormatsShort ( ) : array
리턴 array

getExtras() 공개 정적인 메소드

Get extras
public static getExtras ( array $ids ) : array
$ids array The ids of the modules_extras to get.
리턴 array

getExtrasForData() 공개 정적인 메소드

Get extras for data
public static getExtrasForData ( string $module, string $key, string $value, string $action = null ) : array
$module string The module for the extra.
$key string The key of the data you want to check the value for.
$value string The value to check the key for.
$action string In case you want to search for a certain action.
리턴 array The ids for the extras.

getKeys() 공개 정적인 메소드

Get the page-keys
public static getKeys ( string $language = null ) : array
$language string The language to use, if not provided we will use the working language.
리턴 array

getModulesForDropDown() 공개 정적인 메소드

Fetch the list of modules, but for a dropdown.
public static getModulesForDropDown ( ) : array
리턴 array

getModulesOnFilesystem() 공개 정적인 메소드

Get the modules that are available on the filesystem
public static getModulesOnFilesystem ( boolean $includeCore = true ) : array
$includeCore boolean Should core be included as a module?
리턴 array

getNavigation() 공개 정적인 메소드

Get the navigation-items
public static getNavigation ( string $language = null ) : array
$language string The language to use, if not provided we will use the working language.
리턴 array

getNumberFormats() 공개 정적인 메소드

Fetch the list of number formats including examples of these formats.
public static getNumberFormats ( ) : array
리턴 array

getTimeFormats() 공개 정적인 메소드

Fetch the list of time formats including examples of these formats.
public static getTimeFormats ( ) : array
리턴 array

getToken() 공개 정적인 메소드

Get the token which will protect us
public static getToken ( ) : string
리턴 string

getURL() 공개 정적인 메소드

Get URL for a given pageId
public static getURL ( integer $pageId, string $language = null ) : string
$pageId integer The id of the page to get the URL for.
$language string The language to use, if not provided we will use the working language.
리턴 string

getURLForBlock() 공개 정적인 메소드

Get the URL for a give module & action combination
public static getURLForBlock ( string $module, string $action = null, string $language = null, array $data = null ) : string
$module string The module wherefore the URL should be build.
$action string The specific action wherefore the URL should be build.
$language string The language wherein the URL should be retrieved, if not provided we will load the language that was provided in the URL.
$data array An array with keys and values that partially or fully match the data of the block. If it matches multiple versions of that block it will just return the first match.
리턴 string

imageDelete() 공개 정적인 메소드

Image Delete
public static imageDelete ( string $module, string $filename, string $subDirectory = '', array $fileSizes = null )
$module string Module name.
$filename string Filename.
$subDirectory string Subdirectory.
$fileSizes array Possible file sizes.

insertExtra() 공개 정적인 메소드

Insert extra
public static insertExtra ( string $type, string $module, string $action = null, string $label = null, array $data = null, boolean $hidden = false, integer $sequence = null ) : integer
$type string What type do you want to insert, 'homepage', 'block' or 'widget'.
$module string The module you are inserting this extra for.
$action string The action this extra will use.
$label string Label which will be used when you want to connect this block.
$data array Containing extra variables.
$hidden boolean Should this extra be visible in frontend or not?
$sequence integer
리턴 integer The new extra id

invalidateFrontendCache() 공개 정적인 메소드

사용 중단: : twig doesn't contain this same type of caching out of the box. Use https://github.com/asm89/twig-cache-extension instead
public static invalidateFrontendCache ( string $module = null, string $language = null )
$module string A specific module to clear the cache for.
$language string The language to use.

isModuleInstalled() 공개 정적인 메소드

Is module installed?
public static isModuleInstalled ( string $module ) : boolean
$module string
리턴 boolean

ping() 공개 정적인 메소드

Ping the known webservices
사용 중단:
public static ping ( string $pageOrFeedURL = null, string $category = null ) : boolean
$pageOrFeedURL string The page/feed that has changed.
$category string An optional category for the site.
리턴 boolean If everything went fne true will, otherwise false.

submitHam() 공개 정적인 메소드

Submit ham, this call is intended for the marking of false positives, things that were incorrectly marked as spam.
public static submitHam ( string $userIp, string $userAgent, string $content, string $author = null, string $email = null, string $url = null, string $permalink = null, string $type = null, string $referrer = null, array $others = null ) : boolean
$userIp string IP address of the comment submitter.
$userAgent string User agent information.
$content string The content that was submitted.
$author string Submitted name with the comment.
$email string Submitted email address.
$url string Commenter URL.
$permalink string The permanent location of the entry the comment was submitted to.
$type string May be blank, comment, trackback, pingback, or a made up value like "registration".
$referrer string The content of the HTTP_REFERER header should be sent here.
$others array Other data (the variables from $_SERVER).
리턴 boolean If everything went fine, true will be returned, otherwise an exception will be triggered.

submitSpam() 공개 정적인 메소드

Submit spam, his call is for submitting comments that weren't marked as spam but should have been.
public static submitSpam ( string $userIp, string $userAgent, string $content, string $author = null, string $email = null, string $url = null, string $permalink = null, string $type = null, string $referrer = null, array $others = null ) : boolean
$userIp string IP address of the comment submitter.
$userAgent string User agent information.
$content string The content that was submitted.
$author string Submitted name with the comment.
$email string Submitted email address.
$url string Commenter URL.
$permalink string The permanent location of the entry the comment was submitted to.
$type string May be blank, comment, trackback, pingback, or a made up value like "registration".
$referrer string The content of the HTTP_REFERER header should be sent here.
$others array Other data (the variables from $_SERVER).
리턴 boolean If everything went fine true will be returned, otherwise an exception will be triggered.

updateExtra() 공개 정적인 메소드

Update extra
public static updateExtra ( integer $id, string $key, string $value )
$id integer The id for the extra.
$key string The key you want to update.
$value string The new value.

updateExtraData() 공개 정적인 메소드

Update extra data
public static updateExtraData ( integer $id, string $key, string $value )
$id integer The id for the extra.
$key string The key in the data you want to update.
$value string The new value.