Completed
Push — master ( 944dfb...9c93d5 )
by Thomas
10:01 queued 37s
created

GroupActionReadAction::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
namespace keeko\core\action;
3
4
use keeko\framework\foundation\AbstractAction;
5
use Symfony\Component\HttpFoundation\Request;
6
use Symfony\Component\HttpFoundation\Response;
7
use Symfony\Component\OptionsResolver\OptionsResolver;
8
use keeko\core\domain\GroupDomain;
9
10
/**
11
 * Reads the relationship of group to action
12
 * 
13
 * This code is automatically created. Modifications will probably be overwritten.
14
 * 
15
 * @author gossi
16
 */
17
class GroupActionReadAction extends AbstractAction {
18
19
	/**
20
	 * @param OptionsResolver $resolver
21
	 */
22
	public function configureParams(OptionsResolver $resolver) {
23
		$resolver->setRequired(['id']);
24
	}
25
26
	/**
27
	 * Automatically generated run method
28
	 * 
29
	 * @param Request $request
30
	 * @return Response
31
	 */
32
	public function run(Request $request) {
33
		$id = $this->getParam('id');
34
		$domain = new GroupDomain($this->getServiceContainer());
35
		$payload = $domain->read($id);
36
		return $this->responder->run($request, $payload);
37
	}
38
}
39