continue with getter/setter removal

This commit is contained in:
Dennis Eichhorn 2023-05-30 04:15:42 +02:00
parent dbe10d9d09
commit ef734384ae
2 changed files with 17 additions and 17 deletions

View File

@ -117,7 +117,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$task $task
); );
} }
@ -386,7 +386,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulUpdate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulUpdate'),
$new $new
); );
} }
@ -491,7 +491,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$element $element
); );
} }
@ -726,7 +726,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulUpdate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulUpdate'),
$new $new
); );
} }
@ -798,7 +798,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$attribute $attribute
); );
} }
@ -884,7 +884,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$attrL11n $attrL11n
); );
} }
@ -903,7 +903,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') ?? '';
@ -961,7 +961,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$attrType $attrType
); );
} }
@ -1047,7 +1047,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$attrValue $attrValue
); );
} }
@ -1130,7 +1130,7 @@ final class ApiController extends Controller
$response, $response,
NotificationLevel::OK, NotificationLevel::OK,
'', '',
$this->app->l11nManager->getText($response->getLanguage(), '0', '0', 'SucessfulCreate'), $this->app->l11nManager->getText($response->header->l11n->language, '0', '0', 'SucessfulCreate'),
$attrL11n $attrL11n
); );
} }
@ -1149,7 +1149,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

@ -72,7 +72,7 @@ final class BackendController extends Controller implements DashboardElementInte
->with('tags') ->with('tags')
->with('tags/title') ->with('tags/title')
->where('status', TaskStatus::OPEN, '!=') ->where('status', TaskStatus::OPEN, '!=')
->where('tags/title/language', $response->getLanguage()) ->where('tags/title/language', $response->header->l11n->language)
->sort('createdAt', OrderType::DESC) ->sort('createdAt', OrderType::DESC)
->limit(25); ->limit(25);
@ -108,7 +108,7 @@ final class BackendController extends Controller implements DashboardElementInte
->with('createdBy') ->with('createdBy')
->with('tags') ->with('tags')
->with('tags/title') ->with('tags/title')
->where('tags/title/language', $response->getLanguage()) ->where('tags/title/language', $response->header->l11n->language)
->where('status', TaskStatus::OPEN) ->where('status', TaskStatus::OPEN)
->sort('createdAt', OrderType::DESC) ->sort('createdAt', OrderType::DESC)
->query($openQuery) ->query($openQuery)
@ -140,7 +140,7 @@ final class BackendController extends Controller implements DashboardElementInte
->sort('taskElements/createdAt', OrderType::DESC) ->sort('taskElements/createdAt', OrderType::DESC)
->limit(5) ->limit(5)
->where('id', 0, '>') ->where('id', 0, '>')
->where('tags/title/language', $response->getLanguage()) ->where('tags/title/language', $response->header->l11n->language)
->execute(); ->execute();
$view->addData('tasks', $tasks); $view->addData('tasks', $tasks);
@ -176,8 +176,8 @@ final class BackendController extends Controller implements DashboardElementInte
$view->setTemplate('/Web/Backend/Error/403'); $view->setTemplate('/Web/Backend/Error/403');
$this->app->loadLanguageFromPath( $this->app->loadLanguageFromPath(
$response->getLanguage(), $response->header->l11n->language,
__DIR__ . '/../../../Web/Backend/Error/lang/' . $response->getLanguage() . '.lang.php' __DIR__ . '/../../../Web/Backend/Error/lang/' . $response->header->l11n->language . '.lang.php'
); );
return $view; return $view;
@ -199,7 +199,7 @@ final class BackendController extends Controller implements DashboardElementInte
->with('taskElements/accRelation') ->with('taskElements/accRelation')
->with('taskElements/accRelation/relation') ->with('taskElements/accRelation/relation')
->where('id', (int) $request->getData('id')) ->where('id', (int) $request->getData('id'))
->where('tags/title/language', $request->getLanguage()) ->where('tags/title/language', $request->header->l11n->language)
->execute(); ->execute();
$accountId = $request->header->account; $accountId = $request->header->account;