correct the name of the editors-xtd group plugins class
editors-xtd group plugins class name must have a (plgButton<PluginName>) structure, but JCB creates the names of these classes with (plg<PluginGroup><PluginName>) structure, which makes this type of plugins not work
This commit is contained in:
parent
a106c53b65
commit
d57f35fc00
@ -10149,9 +10149,7 @@ class Get
|
|||||||
// set lang prefix
|
// set lang prefix
|
||||||
$plugin->lang_prefix = $this->langPrefix;
|
$plugin->lang_prefix = $this->langPrefix;
|
||||||
// set plugin class name
|
// set plugin class name
|
||||||
$plugin->class_name = 'Plg' . ucfirst($plugin->group) . ucfirst(
|
$plugin->class_name = ComponentbuilderHelper::createPluginClassName($plugin->group, $plugin->code_name);
|
||||||
$plugin->code_name
|
|
||||||
);
|
|
||||||
// set plugin install class name
|
// set plugin install class name
|
||||||
$plugin->installer_class_name = 'plg' . ucfirst($plugin->group)
|
$plugin->installer_class_name = 'plg' . ucfirst($plugin->group)
|
||||||
. ucfirst($plugin->code_name) . 'InstallerScript';
|
. ucfirst($plugin->code_name) . 'InstallerScript';
|
||||||
|
@ -6589,6 +6589,20 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create plugin class name
|
||||||
|
*/
|
||||||
|
public static function createPluginClassName($group, $code_name)
|
||||||
|
{
|
||||||
|
// editors-xtd group plugins must have a class with plgButton<PluginName> structure
|
||||||
|
if ($group == 'editors-xtd')
|
||||||
|
$group= 'Button';
|
||||||
|
|
||||||
|
return 'Plg' . ucfirst($group) . ucfirst(
|
||||||
|
$code_name
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a plugin fields IDs
|
* get a plugin fields IDs
|
||||||
*/
|
*/
|
||||||
|
@ -6624,6 +6624,21 @@ abstract class ComponentbuilderHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create plugin class name
|
||||||
|
*/
|
||||||
|
public static function createPluginClassName($group, $code_name)
|
||||||
|
{
|
||||||
|
// editors-xtd group plugins must have a class with plgButton<PluginName> structure
|
||||||
|
if ($group == 'editors-xtd')
|
||||||
|
$group= 'Button';
|
||||||
|
|
||||||
|
return 'Plg' . ucfirst($group) . ucfirst(
|
||||||
|
$code_name
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get an admin view fields IDs
|
* get an admin view fields IDs
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user