This commit addresses two issues:
1. Re-applies the fix for the `PluginSocProfile` registration.
The extraneous 'classname' attribute, which caused a warning
(Warning: Unknown attributes "classname" used in "PluginSocProfile" class
registration in /var/www/glpi/src/Plugin.php on line 1667),
has been removed. The registration is now correctly:
`Plugin::registerClass('PluginSocProfile');`
2. Ensures plugin activation/deactivation functions are present.
Adds the `plugin_enable_soc` and `plugin_disable_soc` functions
to `setup.php`. These are required by GLPI to manage the plugin's
lifecycle and display the enable/disable buttons in the plugin
management interface.
These changes ensure the plugin registers correctly without warnings and
can be properly activated and deactivated within GLPI.
Added the missing `plugin_enable_soc` and `plugin_disable_soc`
functions to `setup.php`.
These functions are required by GLPI to manage the plugin's lifecycle
and display the enable/disable buttons in the plugin management interface.
Currently, they simply return true, but can be expanded with specific
logic if needed in the future.
This change should allow the plugin to be activated from the GLPI UI.
The 'classname' attribute was causing a warning during plugin installation
as it's not a recognized option in the Plugin::registerClass method for
this type of class.
This commit removes the unnecessary attribute, relying on the standard
behavior where the class name is inferred from the first argument.
Adds the following mandatory functions to setup.php to ensure the plugin
can be correctly registered and identified by GLPI:
- `plugin_version()`: Parses plugin.xml to provide metadata such as name,
version, author, and compatibility to GLPI.
- `plugin_init_options()`: Returns essential plugin identifiers like
its key and display name.
- Stub functions `plugin_check_prerequisites()`, `plugin_check_config()`,
and `plugin_display_config()`: Added to prevent potential errors and
serve as placeholders for future functionality.
These changes address the issue of the plugin not appearing in the GLPI
plugin installation interface.