forms-3rdparty-integration icon indicating copy to clipboard operation
forms-3rdparty-integration copied to clipboard

Form plugins (addons) should attach themselves to singleton

Open zaus opened this issue 9 years ago • 0 comments

As mentioned in suggestion here, the form plugin instances should

Probably as part of a base constructor in fplugin_base.php like:

function __construct() { Forms3rdpartyIntegration::$instance->attach_plugin($this); }

and back in the main plugin

private $_addons = array();
function attach_plugin($addon) {  $this->_addons[ $addon->FPLUGIN() ] = $addon; }

This would let you leverage (future) addon-agnostic functionality like field pickers in the admin ui, a la #22 .

zaus avatar Nov 08 '14 09:11 zaus