Completed
Push — master ( 6fcebc...8d56df )
by Tomas Norre
05:53
created

GolfCourseRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 19
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findAll() 0 11 1
1
<?php
2
namespace TNM\GolfCourses\Domain\Repository;
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
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
31
32
/**
33
 * The repository for GolfCourses
34
 */
35
class GolfCourseRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
36
{
37
38
    /**
39
     * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
40
     */
41
    public function findAll()
42
    {
43
        /** @var QueryInterface $query */
44
        $query = $this->createQuery();
45
        $querySettings = $query->getQuerySettings();
46
        $querySettings->setRespectStoragePage(false);
47
        $querySettings->setIgnoreEnableFields(true);
48
        $query->setOrderings(['name' => 'ASC']);
49
        $query->setQuerySettings($querySettings);
50
        return $query->execute();
51
    }
52
53
}