protected static function importDefaultOptions($pluginName, $options)
{
$form = new \Ip\Form();
/* @var $form \Ip\Form */
$form = Helper::pluginPropertiesFormFields($pluginName, $form);
foreach ($options as $option) {
if (empty($option['name'])) {
continue;
}
$field = $form->getField($option['name']);
if (!$field) {
continue;
}
$optionKey = $pluginName . '.' . $option['name'];
if (!is_null(ipGetOption($optionKey))) {
// option already exists
continue;
}
ipSetOption($pluginName . '.' . $option['name'], $field->getValue());
}
}