Method | Description | |
---|---|---|
__construct ( SpoonDatabase $db, array $languages, array $interfaceLanguages, boolean $example = false, array $variables = [] ) | ||
getDefaultExtras ( ) : array | Get the default extras. | |
subscribeToEvent ( string $eventModule, string $eventName, string $module, mixed $callback ) | Subscribe to an event, when the subscription already exists, the callback will be updated. |
Method | Description | |
---|---|---|
addDefaultExtra ( integer $extraId, string $position ) | Adds a default extra to the stack of extras | |
addModule ( string $module ) | Inserts a new module. | |
addSearchIndex ( string $module, integer $otherId, array $fields, string $language ) | Add a search index | |
execute ( ) | Method that will be overridden by the specific installers | |
getDB ( ) : SpoonDatabase | Get the database-handle | |
getDefaultUserID ( ) : integer | Get the default user | |
getInterfaceLanguages ( ) | Get the selected cms interface languages | |
getLanguages ( ) | Get the selected languages | |
getLocale ( string $name, string $module = 'Core', string $language = 'en', string $type = 'lbl', string $application = 'Backend' ) : string | Get a locale item. | |
getModule ( ) : string | Get the module name | |
getSetting ( string $module, string $name ) : mixed | Get a setting | |
getTemplateId ( string $template, string $theme = null ) : integer | Get the id of the requested template of the active theme. | |
getVariable ( string $name ) : mixed | Get a variable | |
importLocale ( string $filename, boolean $overwriteConflicts = false ) | Imports the locale XML file | |
importSQL ( string $filename ) | Imports the sql file | |
insertDashboardWidget ( string $module, string $widget ) | Insert a dashboard widget | |
insertExtra ( string $module, |
Insert an extra | |
insertMeta ( string $keywords, string $description, string $title, string $url, boolean $keywordsOverwrite = false, boolean $descriptionOverwrite = false, boolean $titleOverwrite = false, boolean $urlOverwrite = false, string $custom = null, array $data = null ) : integer | Insert a meta item | |
insertPage ( array $revision, array $meta = null, array $block = null ) : integer | Insert a page | |
installExample ( ) : boolean | Should example data be installed | |
makeSearchable ( string $module, boolean $searchable = true, integer $weight = 1 ) | Make a module searchable | |
setActionRights ( integer $groupId, string $module, string $action, integer $level = 7 ) | Set the rights for an action | |
setModuleRights ( integer $groupId, string $module ) | Sets the rights for a module | |
setNavigation ( integer $parentId, string $label, string $url = '', array $selectedFor = null, integer $sequence = null ) : integer | Set a new navigation item. | |
setSetting ( string $module, string $name, mixed $value = null, boolean $overwrite = false ) | Stores a module specific setting in the database. |
public __construct ( SpoonDatabase $db, array $languages, array $interfaceLanguages, boolean $example = false, array $variables = [] ) | ||
$db | SpoonDatabase | The database-connection. |
$languages | array | The selected frontend languages. |
$interfaceLanguages | array | The selected backend languages. |
$example | boolean | Should example data be installed. |
$variables | array | The passed variables. |
protected addDefaultExtra ( integer $extraId, string $position ) | ||
$extraId | integer | The extra id to add to every page. |
$position | string | The position to put the default extra. |
protected execute ( ) |
protected getDB ( ) : SpoonDatabase | ||
return | SpoonDatabase |
public getDefaultExtras ( ) : array | ||
return | array |
protected getDefaultUserID ( ) : integer | ||
return | integer |
protected getInterfaceLanguages ( ) |
protected getVariable ( string $name ) : mixed | ||
$name | string | |
return | mixed |
protected importLocale ( string $filename, boolean $overwriteConflicts = false ) | ||
$filename | string | The full path for the XML-file. |
$overwriteConflicts | boolean | Should we overwrite when there is a conflict? |
protected insertDashboardWidget ( string $module, string $widget ) | ||
$module | string | |
$widget | string |
protected insertExtra ( string $module, |
||
$module | string | The module for the extra. |
$type | The type, possible values are: homepage, widget, block. | |
$label | string | The label for the extra. |
$action | string | The action. |
$data | string | Optional data, will be passed in the extra. |
$hidden | boolean | Is this extra hidden? |
$sequence | integer | The sequence for the extra. |
return | integer |
protected insertMeta ( string $keywords, string $description, string $title, string $url, boolean $keywordsOverwrite = false, boolean $descriptionOverwrite = false, boolean $titleOverwrite = false, boolean $urlOverwrite = false, string $custom = null, array $data = null ) : integer | ||
$keywords | string | The keyword of the item. |
$description | string | A description of the item. |
$title | string | The page title for the item. |
$url | string | The unique URL. |
$keywordsOverwrite | boolean | Should the keywords be overwritten? |
$descriptionOverwrite | boolean | Should the descriptions be overwritten? |
$titleOverwrite | boolean | Should the page title be overwritten? |
$urlOverwrite | boolean | Should the URL be overwritten? |
$custom | string | Any custom meta-data. |
$data | array | Any custom meta-data. |
return | integer |
protected installExample ( ) : boolean | ||
return | boolean |
protected setActionRights ( integer $groupId, string $module, string $action, integer $level = 7 ) | ||
$groupId | integer | The group wherefore the rights will be set. |
$module | string | The module wherein the action appears. |
$action | string | The action wherefore the rights have to set. |
$level | integer | The level, default is 7 (max). |
protected setModuleRights ( integer $groupId, string $module ) | ||
$groupId | integer | The group wherefore the rights will be set. |
$module | string | The module too set the rights for. |
public subscribeToEvent ( string $eventModule, string $eventName, string $module, mixed $callback ) | ||
$eventModule | string | The module that triggers the event. |
$eventName | string | The name of the event. |
$module | string | The module that subscribes to the event. |
$callback | mixed | The callback that should be executed when the event is triggered. |