Editors xtd #871

Closed
saman222 wants to merge 3 commits from editors_xtd into staging
3 changed files with 33 additions and 6 deletions
Showing only changes of commit d57f35fc00 - Show all commits

View File

@ -10149,9 +10149,7 @@ class Get
// set lang prefix
$plugin->lang_prefix = $this->langPrefix;
// set plugin class name
$plugin->class_name = 'Plg' . ucfirst($plugin->group) . ucfirst(
$plugin->code_name
);
$plugin->class_name = ComponentbuilderHelper::createPluginClassName($plugin->group, $plugin->code_name);
// set plugin install class name
$plugin->installer_class_name = 'plg' . ucfirst($plugin->group)
. ucfirst($plugin->code_name) . 'InstallerScript';

View File

@ -6587,8 +6587,22 @@ abstract class ComponentbuilderHelper
return array_values($fieldIds);
}
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
*/

View File

@ -6622,7 +6622,22 @@ abstract class ComponentbuilderHelper
return array_values($fieldIds);
}
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