Account::getInfo()
Version 3.8
Account info
Version 3.8
Account info
Get or set account specific, persistent session info. Can be used to save values that are needed between multiple requests / users. For example when the customer data was last time synced with third party application.
Object
Get value:
$this->get('account')->getInfo()->getParam('myname/subname');
// OR
$this->get('account')->getInfo('myname/subname');
Set value:
$this->get('account')->getInfo()->setParam('myname/subname','myvalue');
// OR
$this->get('account')->setInfo('myname/subname','myvalue');
Check if address -table is up to date:
if ( $this->get('account')->getInfo()->setVersion('schema/version/address',1.1) ){
// Run me, if value was smaller than 1.1
// setVersion() sets the new value, so this is run only once!
}
Method | Return | Description |
---|---|---|
getParam(name) | string | Get value for given name |
setParam(name,value) | this | Set value for given name |
setVersion(name,value) | bool | Set given value, if it is greater than current value. Return true, if value was changed. |
Preserved names
Last modification time (Y-m-d H:i:s) of application data. This value is used for checking if there is a need to update cached values.
Name | Type | Description |
---|---|---|
resource/table/modified | Table preferences. | |
resource/field/modified | Table field preferences. | |
resource/page/modified | Table pages. | |
resource/action/modified | Action preferences. | |
resource/import/modified | Import preferences. | |
resource/profile/modified | Profile preferences. | |
resource/user/modified | Users. |
Version number of service schema. This value is used for checking schema is up to date (ie. all database tables, columns, indexes etc. are created).
Name | Type | Description |
---|---|---|
schema/version/address | int | Address field type table |
schema/version/person | int | Person field type table |
schema/version/company | int | Company field type table |
schema/version/note | int | Note field type table |
schema/version/tag | int | Tag field type table |
schema/version/file | int | File field type table |
schema/version/tablerow | int | Person field type table |
schema/version/changelog | int | Changelog |
schema/version/profile | int | Profiles |
schema/version/hylly | int | Tablegroup |
schema/version/raportti | int | Reports |
schema/version/lista | int | Lists (deprecated) |
schema/version/kotisivu | int | Actions |
schema/version/tuonti | int | Imports |