mirror of
https://github.com/grocy/grocy.git
synced 2025-09-16 09:51:30 +00:00
Applied PHP formatting rules
This commit is contained in:
@@ -4,22 +4,8 @@ namespace Grocy\Controllers;
|
||||
|
||||
class EquipmentController extends BaseController
|
||||
{
|
||||
public function __construct(\DI\Container $container)
|
||||
{
|
||||
parent::__construct($container);
|
||||
}
|
||||
|
||||
protected $UserfieldsService;
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'equipment', [
|
||||
'equipment' => $this->getDatabase()->equipment()->orderBy('name'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('equipment'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('equipment')
|
||||
]);
|
||||
}
|
||||
|
||||
public function EditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
if ($args['equipmentId'] == 'new')
|
||||
@@ -32,10 +18,26 @@ class EquipmentController extends BaseController
|
||||
else
|
||||
{
|
||||
return $this->renderPage($response, 'equipmentform', [
|
||||
'equipment' => $this->getDatabase()->equipment($args['equipmentId']),
|
||||
'equipment' => $this->getDatabase()->equipment($args['equipmentId']),
|
||||
'mode' => 'edit',
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('equipment')
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'equipment', [
|
||||
'equipment' => $this->getDatabase()->equipment()->orderBy('name'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('equipment'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('equipment')
|
||||
]);
|
||||
}
|
||||
|
||||
public function __construct(\DI\Container $container)
|
||||
{
|
||||
parent::__construct($container);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user