[Added] pseudo field for output
oxcategories__oxlongdesc into the oxmanufacturers object, so existing template structures can immediately catch it up
Dieser Commit ist enthalten in:
Ursprung
fc0dbdb804
Commit
08a81e0eb4
25
Modules/Application/Model/ManufacturerInfoList.php
Normale Datei
25
Modules/Application/Model/ManufacturerInfoList.php
Normale Datei
@ -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);
|
||||
}
|
||||
}
|
18
metadata.php
18
metadata.php
@ -13,12 +13,14 @@
|
||||
|
||||
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 OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||
|
||||
$sMetadataVersion = '2.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';
|
||||
|
||||
$sModuleId = Constants::OXID_MODULE_ID;
|
||||
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
|
||||
@ -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',
|
||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren