mautic / app /bundles /AssetBundle /Event /AssetLoadEvent.php
chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
<?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;
}
}