continue with getter/setter removal

This commit is contained in:
Dennis Eichhorn 2023-05-30 04:15:41 +02:00
parent 1086f9bd9a
commit 61f4906a8b
2 changed files with 6 additions and 6 deletions

View File

@ -174,7 +174,7 @@ final class ApiController extends Controller
$supplierL11n->ref = $request->getDataInt('supplier') ?? 0; $supplierL11n->ref = $request->getDataInt('supplier') ?? 0;
$supplierL11n->type = new NullBaseStringL11nType($request->getDataInt('type') ?? 0); $supplierL11n->type = new NullBaseStringL11nType($request->getDataInt('type') ?? 0);
$supplierL11n->setLanguage( $supplierL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage() $request->getDataString('language') ?? $request->header->l11n->language
); );
$supplierL11n->content = $request->getDataString('description') ?? ''; $supplierL11n->content = $request->getDataString('description') ?? '';
@ -376,7 +376,7 @@ final class ApiController extends Controller
$attrL11n = new BaseStringL11n(); $attrL11n = new BaseStringL11n();
$attrL11n->ref = $request->getDataInt('type') ?? 0; $attrL11n->ref = $request->getDataInt('type') ?? 0;
$attrL11n->setLanguage( $attrL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage() $request->getDataString('language') ?? $request->header->l11n->language
); );
$attrL11n->content = $request->getDataString('title') ?? ''; $attrL11n->content = $request->getDataString('title') ?? '';
@ -601,7 +601,7 @@ final class ApiController extends Controller
$attrL11n = new BaseStringL11n(); $attrL11n = new BaseStringL11n();
$attrL11n->ref = $request->getDataInt('value') ?? 0; $attrL11n->ref = $request->getDataInt('value') ?? 0;
$attrL11n->setLanguage( $attrL11n->setLanguage(
$request->getDataString('language') ?? $request->getLanguage() $request->getDataString('language') ?? $request->header->l11n->language
); );
$attrL11n->content = $request->getDataString('title') ?? ''; $attrL11n->content = $request->getDataString('title') ?? '';

View File

@ -60,7 +60,7 @@ final class BackendController extends Controller
/** @var \Modules\Attribute\Models\AttributeType[] $attributes */ /** @var \Modules\Attribute\Models\AttributeType[] $attributes */
$attributes = SupplierAttributeTypeMapper::getAll() $attributes = SupplierAttributeTypeMapper::getAll()
->with('l11n') ->with('l11n')
->where('l11n/language', $response->getLanguage()) ->where('l11n/language', $response->header->l11n->language)
->execute(); ->execute();
$view->addData('attributes', $attributes); $view->addData('attributes', $attributes);
@ -89,7 +89,7 @@ final class BackendController extends Controller
/** @var \Modules\Attribute\Models\AttributeValue[] $attributes */ /** @var \Modules\Attribute\Models\AttributeValue[] $attributes */
$attributes = SupplierAttributeValueMapper::getAll() $attributes = SupplierAttributeValueMapper::getAll()
->with('l11n') ->with('l11n')
->where('l11n/language', $response->getLanguage()) ->where('l11n/language', $response->header->l11n->language)
->execute(); ->execute();
$view->addData('attributes', $attributes); $view->addData('attributes', $attributes);
@ -119,7 +119,7 @@ final class BackendController extends Controller
$attribute = SupplierAttributeTypeMapper::get() $attribute = SupplierAttributeTypeMapper::get()
->with('l11n') ->with('l11n')
->where('id', (int) $request->getData('id')) ->where('id', (int) $request->getData('id'))
->where('l11n/language', $response->getLanguage()) ->where('l11n/language', $response->header->l11n->language)
->execute(); ->execute();
$l11ns = SupplierAttributeTypeL11nMapper::getAll() $l11ns = SupplierAttributeTypeL11nMapper::getAll()