|
| setModules (array $modules) |
|
| getModules () |
|
| displayModules (array $cols=['name', 'version', 'desc'], array $actions=[], bool $nav_limit=false) |
|
| doActions () |
|
| displayManualForm () |
|
| getActions (string $id, array $module, array $actions) |
|
| getGlobalActions (array $actions, bool $with_selection=false) |
|
static | sanitizeModule (string $id, array $module) |
|
static | isDistributedModule (string $id) |
|
static | sortModules (array $modules, string $field, bool $asc=true) |
|
static | getSettingsUrls (string $id, bool $check=false, bool $self=true) |
|
◆ __construct()
__construct |
( |
dcModules |
$modules, |
|
|
string |
$modules_root, |
|
|
string |
$xml_url, |
|
|
bool |
$force = false |
|
) |
| |
◆ setList()
◆ getList()
Get list ID.
- Returns
- string
References $list_id.
◆ setPath()
◆ getPath()
Get modules root directories.
- Returns
- null|string directory to work on
References $path.
◆ isWritablePath()
Check if modules root directory is writable.
- Returns
- bool True if directory is writable
References $path_writable.
◆ isDeletablePath()
isDeletablePath |
( |
string |
$root | ) |
|
Check if root directory of a module is deletable.
- Parameters
-
string | $root | Module root directory |
- Returns
- bool True if directory is delatable
References dcCore\app().
◆ setURL()
◆ getURL()
getURL |
( |
|
$queries = '' , |
|
|
bool |
$with_tab = true |
|
) |
| |
Get page URL.
- Parameters
-
string | array | $queries | Additionnal query string |
bool | $with_tab | Add current tab to URL end |
- Returns
- string Clean page URL
Referenced by displayIndex(), displaySearch(), and getRedir().
◆ setTab()
◆ getTab()
Get page tab.
- Returns
- string Page tab
References $page_tab.
◆ setRedir()
setRedir |
( |
string |
$default = '' | ) |
|
Set page redirection.
- Parameters
-
string | $default | Default redirection |
- Returns
- adminModulesList self instance
◆ getRedir()
◆ getSearch()
◆ displaySearch()
◆ setIndex()
◆ getIndex()
Get index from query.
- Returns
- string Query index or default one
Referenced by displayIndex().
◆ displayIndex()
◆ setSort()
setSort |
( |
string |
$field, |
|
|
bool |
$asc = true |
|
) |
| |
Set default sort field.
- Parameters
-
string | $field | The field |
bool | $asc | The ascending |
- Returns
- adminModulesList self instance
◆ getSort()
Get sort field from query.
- Returns
- string Query sort field or default one
References $sort_field.
◆ displaySort()
◆ setModules()
setModules |
( |
array |
$modules | ) |
|
◆ getModules()
Get modules currently set.
- Returns
- array Array of modules
References $data.
◆ sanitizeModule()
static sanitizeModule |
( |
string |
$id, |
|
|
array |
$module |
|
) |
| |
|
static |
Sanitize a module.
This clean infos of a module by adding default keys and clean some of them, sanitize module can safely be used in lists.
- Parameters
-
string | $id | The identifier |
array | $module | The module |
- Returns
- array Array of the module informations
References dcModules\DEFAULT_PRIORITY.
Referenced by dcRestMethods\getModuleById(), and setModules().
◆ isDistributedModule()
static isDistributedModule |
( |
string |
$id | ) |
|
|
static |
◆ sortModules()
static sortModules |
( |
array |
$modules, |
|
|
string |
$field, |
|
|
bool |
$asc = true |
|
) |
| |
|
static |
Sort modules list by specific field.
- Parameters
-
array | $modules | Array of modules |
string | $field | Field to sort from |
bool | $asc | Sort asc if true, else decs |
- Returns
- array Array of sorted modules
◆ displayModules()
displayModules |
( |
array |
$cols = ['name', 'version', 'desc'] , |
|
|
array |
$actions = [] , |
|
|
bool |
$nav_limit = false |
|
) |
| |
Display list of modules.
- Parameters
-
array | $cols | List of colones (module field) to display |
array | $actions | List of predefined actions to show on form |
bool | $nav_limit | Limit list to previously selected index |
- Returns
- adminModulesList self instance
Reimplemented in adminThemesList.
◆ getSettingsUrls()
static getSettingsUrls |
( |
string |
$id, |
|
|
bool |
$check = false , |
|
|
bool |
$self = true |
|
) |
| |
|
static |
Get settings URLs if any
- Parameters
-
string | $id | Module ID |
boolean | $check | Check permission |
boolean | $self | Include self URL (→ plugin index.php URL) |
- Returns
- array Array of settings URLs
Referenced by adminPlugin\render().
◆ getActions()
getActions |
( |
string |
$id, |
|
|
array |
$module, |
|
|
array |
$actions |
|
) |
| |
|
protected |
Get action buttons to add to modules list.
- Parameters
-
string | $id | Module ID |
array | $module | Module info |
array | $actions | Actions keys |
- Returns
- array Array of actions buttons
Reimplemented in adminThemesList.
◆ getGlobalActions()
getGlobalActions |
( |
array |
$actions, |
|
|
bool |
$with_selection = false |
|
) |
| |
|
protected |
Get global action buttons to add to modules list.
- Parameters
-
array | $actions | Actions keys |
bool | $with_selection | Limit action to selected modules |
- Returns
- array Array of actions buttons
Reimplemented in adminThemesList.
◆ doActions()
◆ displayManualForm()
Display tab for manual installation.
- Returns
- mixed self instance or null
◆ setConfiguration()
setConfiguration |
( |
string |
$id = null | ) |
|
Prepare module configuration.
We need to get configuration content in three steps and out of this class to keep backward compatibility.
if ($xxx->setConfiguration()) { include $xxx->includeConfiguration(); } $xxx->getConfiguration(); ... [put here page headers and other stuff] $xxx->displayConfiguration();
- Parameters
-
string | $id | Module to work on or it gather through REQUEST |
- Returns
- bool True if config set
◆ includeConfiguration()
Get path of module configuration file.
- Note
- Required previously set file info
- Returns
- mixed Full path of config file or null
◆ getConfiguration()
Gather module configuration file content.
- Note
- Required previously file inclusion
- Returns
- bool True if content has been captured
◆ displayConfiguration()
Display module configuration form.
- Note
- Required previously gathered content
- Returns
- adminModulesList self instance
◆ sanitizeString()
static sanitizeString |
( |
string |
$str | ) |
|
|
static |
Helper to sanitize a string.
Used for search or id.
- Parameters
-
string | $str | String to sanitize |
- Returns
- string Sanitized string
◆ $modules
◆ $store
◆ $allow_multi_install
$allow_multi_install = false |
|
static |
◆ $distributed_modules
$distributed_modules = [] |
|
static |
◆ $list_id
◆ $data
◆ $config_module
◆ $config_file
◆ $config_content
◆ $path
◆ $path_writable
◆ $path_pattern
◆ $page_url
◆ $page_qs
◆ $page_tab
◆ $page_redir
◆ $nav_indexes
$nav_indexes = 'abcdefghijklmnopqrstuvwxyz0123456789' |
|
static |
◆ $nav_list
◆ $nav_special
◆ $sort_field
◆ $sort_asc
The documentation for this class was generated from the following file: