Implement helper traits

This commit is contained in:
Dennis Eichhorn 2023-06-09 19:32:20 +02:00
parent 64b6bd4ea9
commit 37f7adc7d8
2 changed files with 3 additions and 3 deletions

View File

@ -151,6 +151,7 @@ final class BackendController extends Controller
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/vehicle-profile');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
// @todo: This langauge filtering doesn't work. But it was working with the old mappers. Maybe there is a bug in the where() definition. Need to inspect the actual query.
$vehicle = VehicleMapper::get()
->with('attributes')
->with('attributes/type')

View File

@ -44,8 +44,6 @@ class Vehicle implements \JsonSerializable
public array $milage = [];
public array $notes = [];
public int $unit = 0;
public ?int $responsible = null;
@ -76,7 +74,8 @@ class Vehicle implements \JsonSerializable
{
return $this->toArray();
}
use \Modules\Media\Models\MediaListTrait;
use \Modules\Editor\Models\EditorDocListTrait;
use \Modules\Attribute\Models\AttributeHolderTrait;
}