e107sk.com

Custom plugin preferences

on Saturday 13 June 2020
comments: 0

Retrieve all plugin's preferences:

$plugPrefs = e107::getPlugConfig('your_plugin')->getPref();


for using in class:

private $plugPrefs = array();
$this->plugPrefs = $plugPrefs; 

Another way:

$plugPrefs= e107::pref('your_plugin');

Retrieve single plugin preference:

$perPage = e107::pref('your_plugin', 'your_preference');

Update one preference:

To save new value:

e107::getPlugConfig('your_plugin')->set('your_preference', $addonsList)->save(true);


save(true) - value will be replaced
save(false) - value will be added

empty array:

e107::getPlugConfig('visualbuilder')->set('visualbuilder', array())->save(true);

0 Comments

Other links

Follow us