Files
ltsecurityinc/app/code/Plumrocket/CookieConsentPro/Model/Consent/Log.php
T

51 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* @package Plumrocket_CookieConsentPro
* @copyright Copyright (c) 2025 Plumrocket Inc.
* @license https://plumrocket.com/license End-user License Agreement
*/
declare(strict_types=1);
namespace Plumrocket\CookieConsentPro\Model\Consent;
use Magento\Framework\Model\AbstractModel;
use Plumrocket\CookieConsentPro\Api\Data\ConsentLogInterface;
/**
* @since 1.0.1
*/
class Log extends \Plumrocket\CookieConsent\Model\Consent\Log implements ConsentLogInterface
{
/**
* @inheritDoc
*/
public function getInitiatedBy()
{
return $this->getData(self::INITIATED_BY);
}
/**
* @inheritDoc
*/
public function setInitiatedBy(string $initiatedBy)
{
$this->setData(self::INITIATED_BY, $initiatedBy);
return $this;
}
/**
* @return AbstractModel
*/
public function beforeSave()
{
$initiatedBy = $this->getInitiatedBy();
if (empty($initiatedBy)) {
$this->setInitiatedBy('Сustomer');
}
return parent::beforeSave();
}
}