Completed
Push — master ( 59e212...b47528 )
by Tomas Norre
17:00
created

ListController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A listAction() 0 5 1
1
<?php
2
namespace TNM\GolfCourses\Controller;
3
4
5
/***************************************************************
6
 *
7
 *  Copyright notice
8
 *
9
 *  (c) 2016 Tomas Norre Mikkelsen <[email protected]>
10
 *
11
 *  All rights reserved
12
 *
13
 *  This script is part of the TYPO3 project. The TYPO3 project is
14
 *  free software; you can redistribute it and/or modify
15
 *  it under the terms of the GNU General Public License as published by
16
 *  the Free Software Foundation; either version 3 of the License, or
17
 *  (at your option) any later version.
18
 *
19
 *  The GNU General Public License can be found at
20
 *  http://www.gnu.org/copyleft/gpl.html.
21
 *
22
 *  This script is distributed in the hope that it will be useful,
23
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 *  GNU General Public License for more details.
26
 *
27
 *  This copyright notice MUST APPEAR in all copies of the script!
28
 ***************************************************************/
29
30
/**
31
 * GolfCourseController
32
 */
33
class ListController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
34
{
35
36
    /**
37
     * golfCourseRepository
38
     *
39
     * @var \TNM\GolfCourses\Domain\Repository\GolfCourseRepository
40
     * @inject
41
     */
42
    protected $golfCourseRepository = NULL;
43
    
44
    /**
45
     * action list
46
     *
47
     * @return void
48
     */
49
    public function listAction()
50
    {
51
        $golfCourses = $this->golfCourseRepository->findAll();
52
        $this->view->assign('golfCourses', $golfCourses);
53
    }
54
55
}