Initial commit: CloudOps infrastructure platform

This commit is contained in:
root
2026-04-09 19:58:57 +02:00
commit 1166a52f26
7762 changed files with 839452 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Mautic\AssetBundle\Event;
use Mautic\AssetBundle\Entity\Asset;
use Mautic\CoreBundle\Event\CommonEvent;
class AssetEvent extends CommonEvent
{
/**
* @param bool $isNew
*/
public function __construct(Asset $asset, $isNew = false)
{
$this->entity = $asset;
$this->isNew = $isNew;
}
/**
* Returns the Asset entity.
*
* @return Asset
*/
public function getAsset()
{
return $this->entity;
}
/**
* Sets the Asset entity.
*/
public function setAsset(Asset $asset): void
{
$this->entity = $asset;
}
}

View File

@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
namespace Mautic\AssetBundle\Event;
use Mautic\CoreBundle\Event\CommonEvent;
final class AssetExportListEvent extends CommonEvent
{
/**
* @var array<string>
*/
private array $list = [];
/**
* @param list<array<string, array<string, mixed>>> $data
*/
public function __construct(private array $data)
{
}
/**
* @return list<array<string, array<string, mixed>>>
*/
public function getEntityData(): array
{
return $this->data;
}
public function setList(string $item): void
{
if (!in_array($item, $this->list)) {
$this->list[] = $item;
}
}
/**
* @return array<string>|null
*/
public function getList(): ?array
{
return $this->list ?? null;
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace Mautic\AssetBundle\Event;
use Mautic\AssetBundle\Entity\Download;
use Mautic\CoreBundle\Event\CommonEvent;
class AssetLoadEvent extends CommonEvent
{
public function __construct(
Download $download,
protected bool $unique,
) {
$this->entity = $download;
}
/**
* Returns the Download entity.
*
* @return Download
*/
public function getRecord()
{
return $this->entity;
}
/**
* @return \Mautic\AssetBundle\Entity\Asset
*/
public function getAsset()
{
return $this->entity->getAsset();
}
/**
* Returns if this is the first download for the session.
*/
public function isUnique(): bool
{
return $this->unique;
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace Mautic\AssetBundle\Event;
use Gaufrette\Adapter;
use Mautic\CoreBundle\Event\CommonEvent;
use Mautic\PluginBundle\Integration\UnifiedIntegrationInterface;
class RemoteAssetBrowseEvent extends CommonEvent
{
private ?Adapter $adapter = null;
private ?string $failureMessage = null;
public function __construct(
private UnifiedIntegrationInterface $integration,
) {
}
public function getAdapter(): ?Adapter
{
return $this->adapter;
}
public function getIntegration(): UnifiedIntegrationInterface
{
return $this->integration;
}
public function setAdapter(Adapter $adapter): void
{
$this->adapter = $adapter;
}
public function setFailed(string $message): void
{
$this->failureMessage = $message;
}
public function getFailureMessage(): ?string
{
return $this->failureMessage;
}
}