b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / dev2.destoffenstraat.com / app / code / SR / Theme / Model /
Filename/home/dev2.destoffenstraat.com/app/code/SR/Theme/Model/Theme.php
Size1.73 kb
Permissionrwxrwxrwx
Ownerroot : root
Create time17-Aug-2025 10:26
Last modified06-Apr-2021 18:06
Last accessed22-Aug-2025 06:06
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php


namespace SR\Theme\Model;

use SR\Theme\Api\Data\ThemeInterface;
use SR\Theme\Api\Data\ThemeInterfaceFactory;
use Magento\Framework\Api\DataObjectHelper;

class Theme extends \Magento\Framework\Model\AbstractModel
{

protected $_eventPrefix = 'sr_theme_theme';
protected $dataObjectHelper;

protected $themeDataFactory;


/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param ThemeInterfaceFactory $themeDataFactory
* @param DataObjectHelper $dataObjectHelper
* @param \SR\Theme\Model\ResourceModel\Theme $resource
* @param \SR\Theme\Model\ResourceModel\Theme\Collection $resourceCollection
* @param array $data
*/
public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
ThemeInterfaceFactory $themeDataFactory,
DataObjectHelper $dataObjectHelper,
\SR\Theme\Model\ResourceModel\Theme $resource,
\SR\Theme\Model\ResourceModel\Theme\Collection $resourceCollection,
array $data = []
) {
$this->themeDataFactory = $themeDataFactory;
$this->dataObjectHelper = $dataObjectHelper;
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
}

/**
* Retrieve theme model with theme data
* @return ThemeInterface
*/
public function getDataModel()
{
$themeData = $this->getData();

$themeDataObject = $this->themeDataFactory->create();
$this->dataObjectHelper->populateWithArray(
$themeDataObject,
$themeData,
ThemeInterface::class
);

return $themeDataObject;
}
}