OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
14
app/Domain/Plugins/Contracts/PluginDisplayStrategy.php
Normal file
14
app/Domain/Plugins/Contracts/PluginDisplayStrategy.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Plugins\Contracts;
|
||||
|
||||
interface PluginDisplayStrategy
|
||||
{
|
||||
public function getCardDesc(): string;
|
||||
|
||||
public function getPluginImageData(): string;
|
||||
|
||||
public function getMetadataLinks(): array;
|
||||
|
||||
public function getControlsView(): string;
|
||||
}
|
||||
46
app/Domain/Plugins/Contracts/PluginInterface.php
Normal file
46
app/Domain/Plugins/Contracts/PluginInterface.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Plugins\Contracts;
|
||||
|
||||
/**
|
||||
* Interface PluginInterface
|
||||
*
|
||||
* This interface represents a plugin that can be installed, uninstalled, enabled, and disabled.
|
||||
*/
|
||||
interface PluginInterface
|
||||
{
|
||||
/**
|
||||
* Installs the plugin.
|
||||
*
|
||||
* @return bool True if the installation is successful, false otherwise.
|
||||
*/
|
||||
public function install(): bool;
|
||||
|
||||
/**
|
||||
* Uninstalls the plugin.
|
||||
*
|
||||
* This method performs the necessary actions to uninstall the application and remove all associated files and data.
|
||||
*
|
||||
* @return bool Returns true if the uninstallation is successful, false otherwise.
|
||||
*/
|
||||
public function uninstall(): bool;
|
||||
|
||||
/**
|
||||
* Enables the plugin.
|
||||
*
|
||||
* This method performs the necessary actions to enable the specified functionality. It may update configuration settings, start background processes, or perform any other actions required
|
||||
* to enable the functionality.
|
||||
*
|
||||
* @return bool Returns true if the enable operation is successful, false otherwise.
|
||||
*/
|
||||
public function enable(): bool;
|
||||
|
||||
/**
|
||||
* Disable the plugin.
|
||||
*
|
||||
* This method disables the functionality and returns a boolean value indicating whether the functionality is successfully disabled or not.
|
||||
*
|
||||
* @return bool True if the functionality is successfully disabled, false otherwise.
|
||||
*/
|
||||
public function disable(): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user