This commit is contained in:
Dennis Eichhorn 2023-09-10 18:58:34 +00:00
parent e8f196fe12
commit 1ac9e10a9f
4 changed files with 6 additions and 6 deletions

View File

@ -149,7 +149,7 @@ final class Installer extends InstallerAbstract
return [];
}
/** @var \Modules\Editor\Models\EditorDocType $type */
/** @var \phpOMS\Localization\BaseStringL11nType $type */
$type = $responseData['response'];
$id = $type->id;

View File

@ -261,7 +261,7 @@ final class ApiDocTypeController extends Controller
return;
}
/** @var \Modules\Editor\Models\EditorDocType $contractType */
/** @var BaseStringL11nType $contractType */
$contractType = EditorDocTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $contractType, EditorDocTypeMapper::class, 'contract_type', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $contractType);
@ -377,7 +377,7 @@ final class ApiDocTypeController extends Controller
return;
}
/** @var \Modules\Editor\Models\EditorDocTypeL11n $contractTypeL11n */
/** @var BaseStringL11n $contractTypeL11n */
$contractTypeL11n = EditorDocTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $contractTypeL11n, EditorDocTypeL11nMapper::class, 'contract_type_l11n', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $contractTypeL11n);

View File

@ -73,7 +73,7 @@ class EditorDoc implements \JsonSerializable
/**
* Type.
*
* @var null|EditorDocType
* @var null|BaseStringL11nType
* @since 1.0.0
*/
public ?BaseStringL11nType $type = null;

View File

@ -87,7 +87,7 @@ trait EditorDocListTrait
{
$notes = [];
foreach ($this->notes as $note) {
if ($note->type?->name === $type) {
if ($note->type?->title === $type) {
$notes[] = $note;
}
}
@ -107,7 +107,7 @@ trait EditorDocListTrait
public function hasEditorDocTypeName(string $type) : bool
{
foreach ($this->notes as $note) {
if ($note->type?->name === $type) {
if ($note->type?->title === $type) {
return true;
}
}