Class Component
- TableAccess
-
Component
Direct known subclasses
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Handle different components of Admidio (e.g. system, plugins or modules) and manage them in the database
The class search in the database table @b adm_components for a specific component and loads the data into this object. A component could be per default the @b SYSTEM itself, a module or a plugin. There are methods to check the version of the system.
Class: Component
Code:
// check if database and filesystem have same version try { $systemComponent = new Component($gDb); $systemComponent->readDataByColumns(array('com_type' => 'SYSTEM', 'com_name_intern' => 'CORE')); $systemComponent->checkDatabaseVersion(true, 'webmaster@example.com'); } catch(AdmException $e) { $e->showHtml(); } @endcode
Par: Examples
Located at component.php
Methods summary
public
|
#
__construct(
Constructor that will create an object of a recordset of the table adm_component. If the id is set than the specific component will be loaded. |
public
|
#
checkDatabaseVersion( )
Check version of component in database against the version of the file system. There will be different messages shown if versions aren't equal. If database has minor version than a link to update the database will be shown. If filesystem has minor version than a link to download current version will be shown. |
Methods inherited from TableAccess
__sleep(),
clear(),
connectAdditionalTable(),
countAllRecords(),
delete(),
getValue(),
hasColumnsValueChanged(),
isNewRecord(),
readData(),
readDataByColumns(),
readDataById(),
save(),
setArray(),
setDatabase(),
setValue()
Properties summary
Properties inherited from TableAccess
$additionalTables,
$columnPrefix,
$columnsInfos,
$columnsValueChanged,
$db,
$dbColumns,
$keyColumnName,
$new_record,
$tableName