This commit is contained in:
Yuri Kuznetsov
2023-05-07 19:18:28 +03:00
parent ae2eff925b
commit faa11d603e
121 changed files with 733 additions and 1573 deletions
+5 -13
View File
@@ -32,24 +32,16 @@ namespace Espo\Hooks\Common;
use Espo\ORM\Entity;
use Espo\Core\ORM\Entity as CoreEntity;
use Espo\Core\{
ORM\Repository\Option\SaveOption,
Utils\Metadata,
Webhook\Manager as WebhookManager};
use Espo\Core\ORM\Repository\Option\SaveOption;
use Espo\Core\Utils\Metadata;
use Espo\Core\Webhook\Manager as WebhookManager;
class Webhook
{
public static int $order = 101;
private Metadata $metadata;
private WebhookManager $webhookManager;
public function __construct(Metadata $metadata, WebhookManager $webhookManager)
{
$this->metadata = $metadata;
$this->webhookManager = $webhookManager;
}
public function __construct(private Metadata $metadata, private WebhookManager $webhookManager)
{}
/**
* @param array<string, mixed> $options
@@ -31,24 +31,15 @@ namespace Espo\Hooks\Notification;
use Espo\ORM\Entity;
use Espo\Core\{
Utils\Config,
WebSocket\Submission as WebSocketSubmission,
};
use Espo\Core\Utils\Config;
use Espo\Core\WebSocket\Submission as WebSocketSubmission;
class WebSocketSubmit
{
public static int $order = 20;
private WebSocketSubmission $webSocketSubmission;
private $config;
public function __construct(WebSocketSubmission $webSocketSubmission, Config $config)
{
$this->webSocketSubmission = $webSocketSubmission;
$this->config = $config;
}
public function __construct(private WebSocketSubmission $webSocketSubmission, private Config $config)
{}
public function afterSave(Entity $entity): void
{
+4 -15
View File
@@ -30,25 +30,14 @@
namespace Espo\Hooks\Portal;
use Espo\ORM\Entity;
use Espo\Entities\Portal;
use Espo\Core\{
Utils\Config,
Utils\Config\ConfigWriter,
};
use Espo\Core\Utils\Config;
use Espo\Core\Utils\Config\ConfigWriter;
class WriteConfig
{
private $config;
private $configWriter;
public function __construct(Config $config, ConfigWriter $configWriter)
{
$this->config = $config;
$this->configWriter = $configWriter;
}
public function __construct(private Config $config, private ConfigWriter $configWriter)
{}
/**
* @param Portal $entity