56 lines
2.0 KiB
PHP
56 lines
2.0 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*
|
|
* https://www.d3data.de
|
|
*
|
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
|
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
|
|
* @link https://www.oxidmodule.com
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace D3\ManufacturerInformation\Modules\Application\Model;
|
|
|
|
use D3\ManufacturerInformation\Application\Model\Constants;
|
|
use OxidEsales\Eshop\Application\Model\Manufacturer;
|
|
use OxidEsales\Eshop\Application\Model\ManufacturerList;
|
|
use OxidEsales\Eshop\Core\Field;
|
|
use OxidEsales\Eshop\Core\Registry;
|
|
|
|
class ManufacturerInfoList extends ManufacturerInfoList_parent
|
|
{
|
|
/**
|
|
* @param Manufacturer|D3ManufacturerLongDesc $oManufacturer
|
|
* @return void
|
|
*/
|
|
protected function _addCategoryFields($oManufacturer)
|
|
{
|
|
parent::_addCategoryFields($oManufacturer);
|
|
|
|
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
|
|
/** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
|
|
$oUtilsView = Registry::getUtilsView();
|
|
|
|
$longdesc = $oManufacturer->d3GetLongdesc()->getRawValue() ?? '';
|
|
$deactivateSmarty = Registry::getConfig()->getConfigParam('deactivateSmartyForCmsContent');
|
|
$processLongDescriptions = Registry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty');
|
|
if (!$deactivateSmarty && $processLongDescriptions) {
|
|
$longdesc = $oUtilsView->parseThroughSmarty(
|
|
$longdesc,
|
|
$oManufacturer->getId() . $oManufacturer->getLanguage(),
|
|
null,
|
|
true
|
|
) ?? '';
|
|
}
|
|
|
|
$oManufacturer->oxcategories__oxlongdesc = new Field(html_entity_decode($longdesc), Field::T_RAW);
|
|
}
|
|
}
|
|
}
|