mautic / app /bundles /PluginBundle /Event /PluginUpdateEvent.php
chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
raw
history blame contribute delete
615 Bytes
<?php
declare(strict_types=1);
namespace Mautic\PluginBundle\Event;
use Mautic\PluginBundle\Entity\Plugin;
use Symfony\Contracts\EventDispatcher\Event;
class PluginUpdateEvent extends Event
{
public function __construct(
private Plugin $plugin,
private string $oldVersion
) {
}
public function getPlugin(): Plugin
{
return $this->plugin;
}
public function getOldVersion(): string
{
return $this->oldVersion;
}
public function checkContext(string $pluginName): bool
{
return $pluginName === $this->plugin->getName();
}
}