[Added] pseudo field for output
oxcategories__oxlongdesc into the oxmanufacturers object, so existing template structures can immediately catch it up
This commit is contained in:
parent
fc0dbdb804
commit
08a81e0eb4
25
Modules/Application/Model/ManufacturerInfoList.php
Normal file
25
Modules/Application/Model/ManufacturerInfoList.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
|
||||
class ManufacturerInfoList extends ManufacturerInfoList_parent
|
||||
{
|
||||
/**
|
||||
* @param Manufacturer|D3ManufacturerLongDesc $oManufacturer
|
||||
* @return void
|
||||
*/
|
||||
protected function _addCategoryFields($oManufacturer)
|
||||
{
|
||||
parent::_addCategoryFields($oManufacturer);
|
||||
|
||||
$oManufacturer->oxcategories__oxlongdesc = new Field($oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME), Field::T_RAW);
|
||||
}
|
||||
}
|
@ -16,7 +16,9 @@ declare(strict_types=1);
|
||||
use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc;
|
||||
use D3\ManufacturerInformation\Application\Model\Constants;
|
||||
use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc;
|
||||
use D3\ManufacturerInformation\Modules\Application\Model\ManufacturerInfoList;
|
||||
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||
use OxidEsales\Eshop\Application\Model\ManufacturerList as OEManufacturerList;
|
||||
|
||||
$sMetadataVersion = '2.1';
|
||||
|
||||
@ -42,7 +44,9 @@ $aModule = [
|
||||
"d3manufacturerinfolongdesc" => ManufacturerInfoLongdesc::class
|
||||
],
|
||||
'extend' => [
|
||||
OEManufacturer::class => D3ManufacturerLongDesc::class
|
||||
// Model
|
||||
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
||||
OEManufacturerList::class => ManufacturerInfoList::class
|
||||
],
|
||||
'events' => [
|
||||
// 'onActivate' => '\D3\ThisModule\Setup\Events::onActivate',
|
||||
|
Loading…
x
Reference in New Issue
Block a user