2024-10-27 12:02:05 +01:00
|
|
|
<?php
|
2024-11-20 18:50:18 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
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\Registry;
|
|
|
|
|
|
|
|
class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
|
|
|
|
{
|
2024-11-20 18:50:18 +01:00
|
|
|
/**
|
|
|
|
* @param string $sValue
|
2024-11-21 00:00:07 +01:00
|
|
|
* @return bool
|
2024-11-20 18:50:18 +01:00
|
|
|
*/
|
|
|
|
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 string
|
|
|
|
*/
|
|
|
|
public function d3GetLongdesc(): string
|
|
|
|
{
|
2024-12-05 12:13:37 +01:00
|
|
|
$longName = $this->_getFieldLongName(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME);
|
|
|
|
return $this->$longName ?: oxNew(Field::class);
|
2024-11-20 18:50:18 +01:00
|
|
|
}
|
|
|
|
}
|