8
0
manufacturer-information/Modules/Application/Model/D3ManufacturerLongDesc.php

41 Zeilen
1.1 KiB
PHP

2024-10-27 12:02:05 +01:00
<?php
2024-11-19 09:54:00 +01:00
2024-10-27 12:02:05 +01:00
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\Core\Field;
2024-10-27 12:02:05 +01:00
use OxidEsales\Eshop\Core\Registry;
class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
{
2024-11-19 09:54:00 +01:00
/**
* @param string $sValue
* @return void
*/
public function d3SetLongdesc(string $sValue) :bool
{
if ($this->getId() and $this->isLoaded()){
try {
$this->assign([Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME => $sValue]);
$this->save();
}catch (\Exception $exception){
Registry::getLogger()->error($exception->getMessage());
}
}
return true;
}
/**
* @return Field
*/
public function d3GetLongdesc(): Field
{
$longName = $this->getCoreTableName().'__'.strtolower(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
2024-11-19 09:54:00 +01:00
return $this->$longName;
}
2024-10-27 12:02:05 +01:00
}