Completed
Push — master ( 1b7a5b...ef1db8 )
by Tomas Norre
19:13 queued 17:31
created
Classes/Domain/Model/GolfCourse.php 1 patch
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -33,144 +33,144 @@
 block discarded – undo
33 33
 class GolfCourse extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
34 34
 {
35 35
 
36
-    /**
37
-     * name
38
-     *
39
-     * @var string
40
-     */
41
-    protected $name = '';
36
+	/**
37
+	 * name
38
+	 *
39
+	 * @var string
40
+	 */
41
+	protected $name = '';
42 42
     
43
-    /**
44
-     * website
45
-     *
46
-     * @var string
47
-     */
48
-    protected $website = '';
43
+	/**
44
+	 * website
45
+	 *
46
+	 * @var string
47
+	 */
48
+	protected $website = '';
49 49
     
50
-    /**
51
-     * comment
52
-     *
53
-     * @var string
54
-     */
55
-    protected $comment = '';
50
+	/**
51
+	 * comment
52
+	 *
53
+	 * @var string
54
+	 */
55
+	protected $comment = '';
56 56
     
57
-    /**
58
-     * country
59
-     *
60
-     * @var int
61
-     */
62
-    protected $country = 0;
57
+	/**
58
+	 * country
59
+	 *
60
+	 * @var int
61
+	 */
62
+	protected $country = 0;
63 63
     
64
-    /**
65
-     * logo
66
-     *
67
-     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
68
-     */
69
-    protected $logo = null;
64
+	/**
65
+	 * logo
66
+	 *
67
+	 * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
68
+	 */
69
+	protected $logo = null;
70 70
     
71
-    /**
72
-     * Returns the name
73
-     *
74
-     * @return string $name
75
-     */
76
-    public function getName()
77
-    {
78
-        return $this->name;
79
-    }
71
+	/**
72
+	 * Returns the name
73
+	 *
74
+	 * @return string $name
75
+	 */
76
+	public function getName()
77
+	{
78
+		return $this->name;
79
+	}
80 80
     
81
-    /**
82
-     * Sets the name
83
-     *
84
-     * @param string $name
85
-     * @return void
86
-     */
87
-    public function setName($name)
88
-    {
89
-        $this->name = $name;
90
-    }
81
+	/**
82
+	 * Sets the name
83
+	 *
84
+	 * @param string $name
85
+	 * @return void
86
+	 */
87
+	public function setName($name)
88
+	{
89
+		$this->name = $name;
90
+	}
91 91
     
92
-    /**
93
-     * Returns the website
94
-     *
95
-     * @return string $website
96
-     */
97
-    public function getWebsite()
98
-    {
99
-        return $this->website;
100
-    }
92
+	/**
93
+	 * Returns the website
94
+	 *
95
+	 * @return string $website
96
+	 */
97
+	public function getWebsite()
98
+	{
99
+		return $this->website;
100
+	}
101 101
     
102
-    /**
103
-     * Sets the website
104
-     *
105
-     * @param string $website
106
-     * @return void
107
-     */
108
-    public function setWebsite($website)
109
-    {
110
-        $this->website = $website;
111
-    }
102
+	/**
103
+	 * Sets the website
104
+	 *
105
+	 * @param string $website
106
+	 * @return void
107
+	 */
108
+	public function setWebsite($website)
109
+	{
110
+		$this->website = $website;
111
+	}
112 112
     
113
-    /**
114
-     * Returns the comment
115
-     *
116
-     * @return string $comment
117
-     */
118
-    public function getComment()
119
-    {
120
-        return $this->comment;
121
-    }
113
+	/**
114
+	 * Returns the comment
115
+	 *
116
+	 * @return string $comment
117
+	 */
118
+	public function getComment()
119
+	{
120
+		return $this->comment;
121
+	}
122 122
     
123
-    /**
124
-     * Sets the comment
125
-     *
126
-     * @param string $comment
127
-     * @return void
128
-     */
129
-    public function setComment($comment)
130
-    {
131
-        $this->comment = $comment;
132
-    }
123
+	/**
124
+	 * Sets the comment
125
+	 *
126
+	 * @param string $comment
127
+	 * @return void
128
+	 */
129
+	public function setComment($comment)
130
+	{
131
+		$this->comment = $comment;
132
+	}
133 133
     
134
-    /**
135
-     * Returns the country
136
-     *
137
-     * @return int $country
138
-     */
139
-    public function getCountry()
140
-    {
141
-        return $this->country;
142
-    }
134
+	/**
135
+	 * Returns the country
136
+	 *
137
+	 * @return int $country
138
+	 */
139
+	public function getCountry()
140
+	{
141
+		return $this->country;
142
+	}
143 143
     
144
-    /**
145
-     * Sets the country
146
-     *
147
-     * @param int $country
148
-     * @return void
149
-     */
150
-    public function setCountry($country)
151
-    {
152
-        $this->country = $country;
153
-    }
144
+	/**
145
+	 * Sets the country
146
+	 *
147
+	 * @param int $country
148
+	 * @return void
149
+	 */
150
+	public function setCountry($country)
151
+	{
152
+		$this->country = $country;
153
+	}
154 154
     
155
-    /**
156
-     * Returns the logo
157
-     *
158
-     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
159
-     */
160
-    public function getLogo()
161
-    {
162
-        return $this->logo;
163
-    }
155
+	/**
156
+	 * Returns the logo
157
+	 *
158
+	 * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
159
+	 */
160
+	public function getLogo()
161
+	{
162
+		return $this->logo;
163
+	}
164 164
     
165
-    /**
166
-     * Sets the logo
167
-     *
168
-     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
169
-     * @return void
170
-     */
171
-    public function setLogo(\TYPO3\CMS\Extbase\Domain\Model\FileReference $logo)
172
-    {
173
-        $this->logo = $logo;
174
-    }
165
+	/**
166
+	 * Sets the logo
167
+	 *
168
+	 * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
169
+	 * @return void
170
+	 */
171
+	public function setLogo(\TYPO3\CMS\Extbase\Domain\Model\FileReference $logo)
172
+	{
173
+		$this->logo = $logo;
174
+	}
175 175
 
176 176
 }
177 177
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Controller/ListController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             $country = $this->countryRepository->findByUid($countryUid);
66 66
             $countryName = $country->getShortNameEn();
67 67
             $coursesInCountry = $this->golfCourseRepository->findAllInCountry($countryUid);
68
-            if(!count($coursesInCountry)) {
68
+            if (!count($coursesInCountry)) {
69 69
                 continue;
70 70
             }
71 71
             $countryAndCourses[$countryName]['name'] = $countryName;
Please login to merge, or discard this patch.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -36,50 +36,50 @@
 block discarded – undo
36 36
 class ListController extends ActionController
37 37
 {
38 38
 
39
-    /**
40
-     * golfCourseRepository
41
-     *
42
-     * @var \TNM\GolfCourses\Domain\Repository\GolfCourseRepository
43
-     * @inject
44
-     */
45
-    protected $golfCourseRepository = null;
39
+	/**
40
+	 * golfCourseRepository
41
+	 *
42
+	 * @var \TNM\GolfCourses\Domain\Repository\GolfCourseRepository
43
+	 * @inject
44
+	 */
45
+	protected $golfCourseRepository = null;
46 46
 
47
-    /**
48
-     * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
49
-     * @inject
50
-     */
51
-    protected $countryRepository = null;
47
+	/**
48
+	 * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
49
+	 * @inject
50
+	 */
51
+	protected $countryRepository = null;
52 52
     
53
-    /**
54
-     * action list
55
-     *
56
-     * @return void
57
-     */
58
-    public function listAction()
59
-    {
53
+	/**
54
+	 * action list
55
+	 *
56
+	 * @return void
57
+	 */
58
+	public function listAction()
59
+	{
60 60
 
61
-        $countryAndCourses = [];
62
-        $coursesTotal = 0;
63
-        $countriesUidsInUse = $this->golfCourseRepository->findCountriesUidsInUse();
61
+		$countryAndCourses = [];
62
+		$coursesTotal = 0;
63
+		$countriesUidsInUse = $this->golfCourseRepository->findCountriesUidsInUse();
64 64
 
65
-        foreach ($countriesUidsInUse as $countryUid) {
66
-            /** @var Country $country */
67
-            $country = $this->countryRepository->findByUid($countryUid);
68
-            $countryName = $country->getShortNameEn();
69
-            $coursesInCountry = $this->golfCourseRepository->findAllInCountry($countryUid);
70
-            if(!count($coursesInCountry)) {
71
-                continue;
72
-            }
73
-            $countryAndCourses[$countryName]['name'] = $countryName;
74
-            /** @var GolfCourse $course */
75
-            foreach ($coursesInCountry as $course) {
76
-                $countryAndCourses[$countryName]['courses'][$course->getUid()] = $course;
77
-                $coursesTotal++;
78
-            }
79
-        }
65
+		foreach ($countriesUidsInUse as $countryUid) {
66
+			/** @var Country $country */
67
+			$country = $this->countryRepository->findByUid($countryUid);
68
+			$countryName = $country->getShortNameEn();
69
+			$coursesInCountry = $this->golfCourseRepository->findAllInCountry($countryUid);
70
+			if(!count($coursesInCountry)) {
71
+				continue;
72
+			}
73
+			$countryAndCourses[$countryName]['name'] = $countryName;
74
+			/** @var GolfCourse $course */
75
+			foreach ($coursesInCountry as $course) {
76
+				$countryAndCourses[$countryName]['courses'][$course->getUid()] = $course;
77
+				$coursesTotal++;
78
+			}
79
+		}
80 80
 
81
-        $this->view->assign('countryAndCourses', $countryAndCourses);
82
-        $this->view->assign('coursesCount', $coursesTotal);
83
-        $this->view->assign('countriesCount', count($countryAndCourses));
84
-    }
81
+		$this->view->assign('countryAndCourses', $countryAndCourses);
82
+		$this->view->assign('coursesCount', $coursesTotal);
83
+		$this->view->assign('countriesCount', count($countryAndCourses));
84
+	}
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Domain/Repository/GolfCourseRepository.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -36,50 +36,50 @@
 block discarded – undo
36 36
 class GolfCourseRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
37 37
 {
38 38
 
39
-    /**
40
-     * @param $countryUid
41
-     *
42
-     * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
43
-     */
44
-    public function findAllInCountry($countryUid)
45
-    {
46
-        /** @var QueryInterface $query */
47
-        $query = $this->createQuery();
39
+	/**
40
+	 * @param $countryUid
41
+	 *
42
+	 * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
43
+	 */
44
+	public function findAllInCountry($countryUid)
45
+	{
46
+		/** @var QueryInterface $query */
47
+		$query = $this->createQuery();
48 48
 
49
-        $querySettings = $query->getQuerySettings();
50
-        $querySettings->setRespectStoragePage(false);
51
-        $querySettings->setIgnoreEnableFields(false);
49
+		$querySettings = $query->getQuerySettings();
50
+		$querySettings->setRespectStoragePage(false);
51
+		$querySettings->setIgnoreEnableFields(false);
52 52
 
53
-        $query->matching($query->equals('country', $countryUid));
54
-        $query->setOrderings(['name' => 'ASC']);
55
-        $query->setQuerySettings($querySettings);
53
+		$query->matching($query->equals('country', $countryUid));
54
+		$query->setOrderings(['name' => 'ASC']);
55
+		$query->setQuerySettings($querySettings);
56 56
 
57
-        return $query->execute();
58
-    }
57
+		return $query->execute();
58
+	}
59 59
 
60
-    /**
61
-     * @return array
62
-     */
63
-    public function findCountriesUidsInUse()
64
-    {
65
-        $uids = [];
66
-        $courses = $this->getDatabaseConnection()->exec_SELECTquery(
67
-            'DISTINCT country',
68
-            'tx_golfcourses_domain_model_golfcourse',
69
-            ''
70
-        );
60
+	/**
61
+	 * @return array
62
+	 */
63
+	public function findCountriesUidsInUse()
64
+	{
65
+		$uids = [];
66
+		$courses = $this->getDatabaseConnection()->exec_SELECTquery(
67
+			'DISTINCT country',
68
+			'tx_golfcourses_domain_model_golfcourse',
69
+			''
70
+		);
71 71
 
72
-        foreach ($courses as $course) {
73
-            $uids[] = $course['country'];
74
-        }
72
+		foreach ($courses as $course) {
73
+			$uids[] = $course['country'];
74
+		}
75 75
 
76
-        return $uids;
77
-    }
76
+		return $uids;
77
+	}
78 78
 
79
-    /**
80
-     * @return DatabaseConnection
81
-     */
82
-    protected function getDatabaseConnection() {
83
-        return $GLOBALS['TYPO3_DB'];
84
-    }
79
+	/**
80
+	 * @return DatabaseConnection
81
+	 */
82
+	protected function getDatabaseConnection() {
83
+		return $GLOBALS['TYPO3_DB'];
84
+	}
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/TCA/tx_golfcourses_domain_model_golfcourse.php 1 patch
Indentation   +188 added lines, -188 removed lines patch added patch discarded remove patch
@@ -1,207 +1,207 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3 3
 'ctrl' => [
4
-        'title'    => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse',
5
-        'label' => 'name',
6
-        'tstamp' => 'tstamp',
7
-        'crdate' => 'crdate',
8
-        'cruser_id' => 'cruser_id',
9
-        'dividers2tabs' => TRUE,
10
-        'versioningWS' => 2,
11
-        'versioning_followPages' => TRUE,
4
+		'title'    => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse',
5
+		'label' => 'name',
6
+		'tstamp' => 'tstamp',
7
+		'crdate' => 'crdate',
8
+		'cruser_id' => 'cruser_id',
9
+		'dividers2tabs' => TRUE,
10
+		'versioningWS' => 2,
11
+		'versioning_followPages' => TRUE,
12 12
 
13
-        'languageField' => 'sys_language_uid',
14
-        'transOrigPointerField' => 'l10n_parent',
15
-        'transOrigDiffSourceField' => 'l10n_diffsource',
16
-        'delete' => 'deleted',
17
-        'enablecolumns' => [
18
-            'disabled' => 'hidden',
19
-            'starttime' => 'starttime',
20
-            'endtime' => 'endtime',
21
-        ],
22
-        'searchFields' => 'name,website,comment,country,logo,',
23
-        'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('golf_courses') . 'Resources/Public/Icons/tx_golfcourses_domain_model_golfcourse.png'
24
-    ],
25
-    'interface' => [
26
-        'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, website, comment, country, logo',
27
-    ],
28
-    'types' => [
29
-        '1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, website, comment, country, logo, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
30
-    ],
31
-    'palettes' => [
32
-        '1' => ['showitem' => ''],
33
-    ],
34
-    'columns' => [
13
+		'languageField' => 'sys_language_uid',
14
+		'transOrigPointerField' => 'l10n_parent',
15
+		'transOrigDiffSourceField' => 'l10n_diffsource',
16
+		'delete' => 'deleted',
17
+		'enablecolumns' => [
18
+			'disabled' => 'hidden',
19
+			'starttime' => 'starttime',
20
+			'endtime' => 'endtime',
21
+		],
22
+		'searchFields' => 'name,website,comment,country,logo,',
23
+		'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('golf_courses') . 'Resources/Public/Icons/tx_golfcourses_domain_model_golfcourse.png'
24
+	],
25
+	'interface' => [
26
+		'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, website, comment, country, logo',
27
+	],
28
+	'types' => [
29
+		'1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, website, comment, country, logo, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
30
+	],
31
+	'palettes' => [
32
+		'1' => ['showitem' => ''],
33
+	],
34
+	'columns' => [
35 35
 
36
-        'sys_language_uid' => [
37
-            'exclude' => 1,
38
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
39
-            'config' => [
40
-                'type' => 'select',
41
-                'renderType' => 'selectSingle',
42
-                'foreign_table' => 'sys_language',
43
-                'foreign_table_where' => 'ORDER BY sys_language.title',
44
-                'items' => [
45
-                    ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1],
46
-                    ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0]
47
-                ],
48
-            ],
49
-        ],
50
-        'l10n_parent' => [
51
-            'displayCond' => 'FIELD:sys_language_uid:>:0',
52
-            'exclude' => 1,
53
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
54
-            'config' => [
55
-                'type' => 'select',
56
-                'renderType' => 'selectSingle',
57
-                'items' => [
58
-                    ['', 0],
59
-                ],
60
-                'foreign_table' => 'tx_golfcourses_domain_model_golfcourse',
61
-                'foreign_table_where' => 'AND tx_golfcourses_domain_model_golfcourse.pid=###CURRENT_PID### AND tx_golfcourses_domain_model_golfcourse.sys_language_uid IN (-1,0)',
62
-            ],
63
-        ],
64
-        'l10n_diffsource' => [
65
-            'config' => [
66
-                'type' => 'passthrough',
67
-            ],
68
-        ],
69
-        't3ver_label' => [
70
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
71
-            'config' => [
72
-                'type' => 'input',
73
-                'size' => 30,
74
-                'max' => 255,
75
-            ]
76
-        ],
77
-        'hidden' => [
78
-            'exclude' => 1,
79
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
80
-            'config' => [
81
-                'type' => 'check',
82
-            ],
83
-        ],
84
-        'starttime' => [
85
-            'exclude' => 1,
86
-            'l10n_mode' => 'mergeIfNotBlank',
87
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
88
-            'config' => [
89
-                'type' => 'input',
90
-                'size' => 13,
91
-                'max' => 20,
92
-                'eval' => 'datetime',
93
-                'checkbox' => 0,
94
-                'default' => 0,
95
-                'range' => [
96
-                    'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
97
-                ],
98
-            ],
99
-        ],
100
-        'endtime' => [
101
-            'exclude' => 1,
102
-            'l10n_mode' => 'mergeIfNotBlank',
103
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
104
-            'config' => [
105
-                'type' => 'input',
106
-                'size' => 13,
107
-                'max' => 20,
108
-                'eval' => 'datetime',
109
-                'checkbox' => 0,
110
-                'default' => 0,
111
-                'range' => [
112
-                    'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
113
-                ],
114
-            ],
115
-        ],
116
-        'name' => [
117
-            'exclude' => 1,
118
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.name',
119
-            'config' => [
120
-                'type' => 'input',
121
-                'size' => 30,
122
-                'eval' => 'trim'
123
-            ],
124
-        ],
125
-        'website' => [
126
-            'exclude' => 1,
127
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.website',
128
-            'config' => [
129
-                'type' => 'input',
130
-                'size' => 30,
131
-                'eval' => 'trim'
132
-            ],
133
-        ],
134
-        'comment' => [
135
-            'exclude' => 1,
136
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.comment',
137
-            'config' => [
138
-                'type' => 'input',
139
-                'size' => 30,
140
-                'eval' => 'trim'
141
-            ],
142
-        ],
143
-        'country' => [
144
-            'exclude' => 1,
145
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.country',
146
-            'config' => [
147
-                'type' => 'select',
148
-                'renderType' => 'selectSingle',
149
-                'items' => [
150
-                    ['Select Country', -1],
151
-                ],
152
-                'foreign_table' => 'static_countries',
153
-                'foreign_table_where' => 'ORDER BY cn_official_name_en ASC',
154
-                'size' => 1,
155
-                'maxitems' => 1,
156
-                'eval' => ''
157
-            ],
158
-        ],
159
-        'logo' => [
160
-            'exclude' => 1,
161
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.logo',
162
-            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
163
-                'logo',
164
-                [
165
-                    'appearance' => [
166
-                        'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
167
-                    ],
168
-                    'foreign_types' => [
169
-                        '0' => [
170
-                            'showitem' => '
36
+		'sys_language_uid' => [
37
+			'exclude' => 1,
38
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
39
+			'config' => [
40
+				'type' => 'select',
41
+				'renderType' => 'selectSingle',
42
+				'foreign_table' => 'sys_language',
43
+				'foreign_table_where' => 'ORDER BY sys_language.title',
44
+				'items' => [
45
+					['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1],
46
+					['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0]
47
+				],
48
+			],
49
+		],
50
+		'l10n_parent' => [
51
+			'displayCond' => 'FIELD:sys_language_uid:>:0',
52
+			'exclude' => 1,
53
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
54
+			'config' => [
55
+				'type' => 'select',
56
+				'renderType' => 'selectSingle',
57
+				'items' => [
58
+					['', 0],
59
+				],
60
+				'foreign_table' => 'tx_golfcourses_domain_model_golfcourse',
61
+				'foreign_table_where' => 'AND tx_golfcourses_domain_model_golfcourse.pid=###CURRENT_PID### AND tx_golfcourses_domain_model_golfcourse.sys_language_uid IN (-1,0)',
62
+			],
63
+		],
64
+		'l10n_diffsource' => [
65
+			'config' => [
66
+				'type' => 'passthrough',
67
+			],
68
+		],
69
+		't3ver_label' => [
70
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
71
+			'config' => [
72
+				'type' => 'input',
73
+				'size' => 30,
74
+				'max' => 255,
75
+			]
76
+		],
77
+		'hidden' => [
78
+			'exclude' => 1,
79
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
80
+			'config' => [
81
+				'type' => 'check',
82
+			],
83
+		],
84
+		'starttime' => [
85
+			'exclude' => 1,
86
+			'l10n_mode' => 'mergeIfNotBlank',
87
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
88
+			'config' => [
89
+				'type' => 'input',
90
+				'size' => 13,
91
+				'max' => 20,
92
+				'eval' => 'datetime',
93
+				'checkbox' => 0,
94
+				'default' => 0,
95
+				'range' => [
96
+					'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
97
+				],
98
+			],
99
+		],
100
+		'endtime' => [
101
+			'exclude' => 1,
102
+			'l10n_mode' => 'mergeIfNotBlank',
103
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
104
+			'config' => [
105
+				'type' => 'input',
106
+				'size' => 13,
107
+				'max' => 20,
108
+				'eval' => 'datetime',
109
+				'checkbox' => 0,
110
+				'default' => 0,
111
+				'range' => [
112
+					'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
113
+				],
114
+			],
115
+		],
116
+		'name' => [
117
+			'exclude' => 1,
118
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.name',
119
+			'config' => [
120
+				'type' => 'input',
121
+				'size' => 30,
122
+				'eval' => 'trim'
123
+			],
124
+		],
125
+		'website' => [
126
+			'exclude' => 1,
127
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.website',
128
+			'config' => [
129
+				'type' => 'input',
130
+				'size' => 30,
131
+				'eval' => 'trim'
132
+			],
133
+		],
134
+		'comment' => [
135
+			'exclude' => 1,
136
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.comment',
137
+			'config' => [
138
+				'type' => 'input',
139
+				'size' => 30,
140
+				'eval' => 'trim'
141
+			],
142
+		],
143
+		'country' => [
144
+			'exclude' => 1,
145
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.country',
146
+			'config' => [
147
+				'type' => 'select',
148
+				'renderType' => 'selectSingle',
149
+				'items' => [
150
+					['Select Country', -1],
151
+				],
152
+				'foreign_table' => 'static_countries',
153
+				'foreign_table_where' => 'ORDER BY cn_official_name_en ASC',
154
+				'size' => 1,
155
+				'maxitems' => 1,
156
+				'eval' => ''
157
+			],
158
+		],
159
+		'logo' => [
160
+			'exclude' => 1,
161
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfcourse.logo',
162
+			'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
163
+				'logo',
164
+				[
165
+					'appearance' => [
166
+						'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
167
+					],
168
+					'foreign_types' => [
169
+						'0' => [
170
+							'showitem' => '
171 171
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
172 172
                             --palette--;;filePalette'
173
-                        ],
174
-                        \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
175
-                            'showitem' => '
173
+						],
174
+						\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
175
+							'showitem' => '
176 176
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
177 177
                             --palette--;;filePalette'
178
-                        ],
179
-                        \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
180
-                            'showitem' => '
178
+						],
179
+						\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
180
+							'showitem' => '
181 181
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
182 182
                             --palette--;;filePalette'
183
-                        ],
184
-                        \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
185
-                            'showitem' => '
183
+						],
184
+						\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
185
+							'showitem' => '
186 186
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
187 187
                             --palette--;;filePalette'
188
-                        ],
189
-                        \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
190
-                            'showitem' => '
188
+						],
189
+						\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
190
+							'showitem' => '
191 191
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
192 192
                             --palette--;;filePalette'
193
-                        ],
194
-                        \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
195
-                            'showitem' => '
193
+						],
194
+						\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
195
+							'showitem' => '
196 196
                             --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
197 197
                             --palette--;;filePalette'
198
-                        ]
199
-                    ],
200
-                    'maxitems' => 1
201
-                ],
202
-                $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
203
-            ),
204
-        ],
198
+						]
199
+					],
200
+					'maxitems' => 1
201
+				],
202
+				$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
203
+			),
204
+		],
205 205
 
206
-    ],
206
+	],
207 207
 ];
208 208
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Hook/Tcemain.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -37,35 +37,35 @@
 block discarded – undo
37 37
 class Tcemain
38 38
 {
39 39
 
40
-    CONST GOLF_ROUND_TALBE = 'tx_golfcourses_domain_model_golfround';
40
+	CONST GOLF_ROUND_TALBE = 'tx_golfcourses_domain_model_golfround';
41 41
 
42
-    /**
43
-     * @var ScoreService
44
-     */
45
-    protected $scoreService;
42
+	/**
43
+	 * @var ScoreService
44
+	 */
45
+	protected $scoreService;
46 46
 
47
-    /**
48
-     * Tcemain constructor.
49
-     */
50
-    public function __construct() {
51
-        $this->scoreService = GeneralUtility::makeInstance(ScoreService::class);
52
-    }
47
+	/**
48
+	 * Tcemain constructor.
49
+	 */
50
+	public function __construct() {
51
+		$this->scoreService = GeneralUtility::makeInstance(ScoreService::class);
52
+	}
53 53
 
54
-    /**
55
-     * Adds realurl path uid if exists.
56
-     *
57
-     * @param array $incomingFieldArray
58
-     * @param string $table
59
-     * @param string|int $id
60
-     * @param DataHandler $dataHandler
61
-     * @return void
62
-     */
63
-    public function processDatamap_preProcessFieldArray(&$incomingFieldArray, $table, $id, DataHandler $dataHandler)
64
-    {
65
-        if (static::GOLF_ROUND_TALBE !== $table) {
66
-            return;
67
-        }
54
+	/**
55
+	 * Adds realurl path uid if exists.
56
+	 *
57
+	 * @param array $incomingFieldArray
58
+	 * @param string $table
59
+	 * @param string|int $id
60
+	 * @param DataHandler $dataHandler
61
+	 * @return void
62
+	 */
63
+	public function processDatamap_preProcessFieldArray(&$incomingFieldArray, $table, $id, DataHandler $dataHandler)
64
+	{
65
+		if (static::GOLF_ROUND_TALBE !== $table) {
66
+			return;
67
+		}
68 68
 
69
-        $incomingFieldArray['score'] = $this->scoreService->calculateScoreToPar($incomingFieldArray['par'], $incomingFieldArray['strokes']);
70
-    }
69
+		$incomingFieldArray['score'] = $this->scoreService->calculateScoreToPar($incomingFieldArray['par'], $incomingFieldArray['strokes']);
70
+	}
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Service/ScoreService.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@
 block discarded – undo
9 9
 class ScoreService
10 10
 {
11 11
 
12
-    /**
13
-     * @return int
14
-     */
15
-    public function calculateScoreToPar($coursePar, $strokes)
16
-    {
17
-        if ($coursePar === $strokes) {
18
-            return 'par';
19
-        }
12
+	/**
13
+	 * @return int
14
+	 */
15
+	public function calculateScoreToPar($coursePar, $strokes)
16
+	{
17
+		if ($coursePar === $strokes) {
18
+			return 'par';
19
+		}
20 20
 
21
-        $prefix = '';
22
-        $score = $strokes - $coursePar;
21
+		$prefix = '';
22
+		$score = $strokes - $coursePar;
23 23
 
24
-        if ($score > 0) {
25
-            $prefix = '+';
26
-        }
27
-        return $prefix . $score;
28
-    }
24
+		if ($score > 0) {
25
+			$prefix = '+';
26
+		}
27
+		return $prefix . $score;
28
+	}
29 29
 
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Controller/RoundsController.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -38,59 +38,59 @@
 block discarded – undo
38 38
 class RoundsController extends ActionController
39 39
 {
40 40
 
41
-    /**
42
-     * @var \TNM\GolfCourses\Domain\Repository\GolfRoundRepository
43
-     * @inject
44
-     */
45
-    protected $golfRoundRepository;
41
+	/**
42
+	 * @var \TNM\GolfCourses\Domain\Repository\GolfRoundRepository
43
+	 * @inject
44
+	 */
45
+	protected $golfRoundRepository;
46 46
 
47
-    /**
48
-     * @var \TNM\GolfCourses\Domain\Repository\GolfCourseRepository
49
-     * @inject
50
-     */
51
-    protected $golfCourseRepository;
47
+	/**
48
+	 * @var \TNM\GolfCourses\Domain\Repository\GolfCourseRepository
49
+	 * @inject
50
+	 */
51
+	protected $golfCourseRepository;
52 52
 
53
-    /**
54
-     * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
55
-     * @inject
56
-     */
57
-    protected $countryRepository;
53
+	/**
54
+	 * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
55
+	 * @inject
56
+	 */
57
+	protected $countryRepository;
58 58
 
59
-    /**
60
-     * @return void
61
-     */
62
-    public function listAction() {
63
-        $rounds = [];
64
-        $golfRounds = $this->golfRoundRepository->findAll();
59
+	/**
60
+	 * @return void
61
+	 */
62
+	public function listAction() {
63
+		$rounds = [];
64
+		$golfRounds = $this->golfRoundRepository->findAll();
65 65
 
66
-        /** @var GolfRound $golfRound */
67
-        foreach ($golfRounds as $golfRound) {
68
-            $rounds[] = [
69
-                'date' => $golfRound->getDate(),
70
-                'regulation' => $golfRound->isRegulation(),
71
-                'course' => $this->getCourseNameAndCountry($golfRound->getCourse()),
72
-                'par' => $golfRound->getPar(),
73
-                'strokes' => $golfRound->getStrokes(),
74
-                'score' => $golfRound->getScore(),
75
-            ];
76
-        }
77
-        $this->view->assign('rounds', $rounds);
78
-    }
66
+		/** @var GolfRound $golfRound */
67
+		foreach ($golfRounds as $golfRound) {
68
+			$rounds[] = [
69
+				'date' => $golfRound->getDate(),
70
+				'regulation' => $golfRound->isRegulation(),
71
+				'course' => $this->getCourseNameAndCountry($golfRound->getCourse()),
72
+				'par' => $golfRound->getPar(),
73
+				'strokes' => $golfRound->getStrokes(),
74
+				'score' => $golfRound->getScore(),
75
+			];
76
+		}
77
+		$this->view->assign('rounds', $rounds);
78
+	}
79 79
 
80
-    /**
81
-     * @param $uid
82
-     *
83
-     * @return string
84
-     */
85
-    private function getCourseNameAndCountry($uid)
86
-    {
87
-        /** @var GolfCourse $golfCourse */
88
-        $golfCourse = $this->golfCourseRepository->findByUid($uid);
80
+	/**
81
+	 * @param $uid
82
+	 *
83
+	 * @return string
84
+	 */
85
+	private function getCourseNameAndCountry($uid)
86
+	{
87
+		/** @var GolfCourse $golfCourse */
88
+		$golfCourse = $this->golfCourseRepository->findByUid($uid);
89 89
 
90
-        /** @var Country $country */
91
-        $country = $this->countryRepository->findByUid($golfCourse->getCountry());
92
-        $countryName = $country->getIsoCodeA2();
90
+		/** @var Country $country */
91
+		$country = $this->countryRepository->findByUid($golfCourse->getCountry());
92
+		$countryName = $country->getIsoCodeA2();
93 93
 
94
-        return $golfCourse->getName() . ' (' . $countryName . ')';
95
-    }
94
+		return $golfCourse->getName() . ' (' . $countryName . ')';
95
+	}
96 96
 }
97 97
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Domain/Repository/GolfRoundRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
  */
33 33
 class GolfRoundRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
34 34
 {
35
-    public function initializeObject() {
36
-        $this->setDefaultOrderings(['date' => 'DESC']);
37
-    }
35
+	public function initializeObject() {
36
+		$this->setDefaultOrderings(['date' => 'DESC']);
37
+	}
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/TCA/tx_golfcourses_domain_model_golfround.php 1 patch
Indentation   +173 added lines, -173 removed lines patch added patch discarded remove patch
@@ -1,177 +1,177 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-    'ctrl' => [
4
-        'title' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround',
5
-        'label' => 'date',
6
-        'tstamp' => 'tstamp',
7
-        'crdate' => 'crdate',
8
-        'cruser_id' => 'cruser_id',
9
-        'dividers2tabs' => TRUE,
10
-        'versioningWS' => 2,
11
-        'versioning_followPages' => TRUE,
3
+	'ctrl' => [
4
+		'title' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround',
5
+		'label' => 'date',
6
+		'tstamp' => 'tstamp',
7
+		'crdate' => 'crdate',
8
+		'cruser_id' => 'cruser_id',
9
+		'dividers2tabs' => TRUE,
10
+		'versioningWS' => 2,
11
+		'versioning_followPages' => TRUE,
12 12
 
13
-        'languageField' => 'sys_language_uid',
14
-        'transOrigPointerField' => 'l10n_parent',
15
-        'transOrigDiffSourceField' => 'l10n_diffsource',
16
-        'delete' => 'deleted',
17
-        'enablecolumns' => [
18
-            'disabled' => 'hidden',
19
-            'starttime' => 'starttime',
20
-            'endtime' => 'endtime',
21
-        ],
22
-        'searchFields' => 'date,course,par,strokes,score',
23
-        'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('golf_courses') . 'Resources/Public/Icons/tx_golfcourses_domain_model_golfround.png'
24
-    ],
25
-    'interface' => [
26
-        'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, course, par, strokes, regulation, score',
27
-    ],
28
-    'types' => [
29
-        '1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, date, course, par, strokes, regulation, score, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
30
-    ],
31
-    'palettes' => [
32
-        '1' => ['showitem' => ''],
33
-    ],
34
-    'columns' => [
35
-        'sys_language_uid' => [
36
-            'exclude' => 1,
37
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
38
-            'config' => [
39
-                'type' => 'select',
40
-                'renderType' => 'selectSingle',
41
-                'foreign_table' => 'sys_language',
42
-                'foreign_table_where' => 'ORDER BY sys_language.title',
43
-                'items' => [
44
-                    ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1],
45
-                    ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0]
46
-                ],
47
-            ],
48
-        ],
49
-        'l10n_parent' => [
50
-            'displayCond' => 'FIELD:sys_language_uid:>:0',
51
-            'exclude' => 1,
52
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
53
-            'config' => [
54
-                'type' => 'select',
55
-                'renderType' => 'selectSingle',
56
-                'items' => [
57
-                    ['', 0],
58
-                ],
59
-                'foreign_table' => 'tx_golfcourses_domain_model_golfround',
60
-                'foreign_table_where' => 'AND tx_golfcourses_domain_model_golfround.pid=###CURRENT_PID### AND tx_golfcourses_domain_model_golfround.sys_language_uid IN (-1,0)',
61
-            ],
62
-        ],
63
-        'l10n_diffsource' => [
64
-            'config' => [
65
-                'type' => 'passthrough',
66
-            ],
67
-        ],
68
-        't3ver_label' => [
69
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
70
-            'config' => [
71
-                'type' => 'input',
72
-                'size' => 30,
73
-                'max' => 255,
74
-            ]
75
-        ],
76
-        'hidden' => [
77
-            'exclude' => 1,
78
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
79
-            'config' => [
80
-                'type' => 'check',
81
-            ],
82
-        ],
83
-        'starttime' => [
84
-            'exclude' => 1,
85
-            'l10n_mode' => 'mergeIfNotBlank',
86
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
87
-            'config' => [
88
-                'type' => 'input',
89
-                'size' => 13,
90
-                'max' => 20,
91
-                'eval' => 'datetime',
92
-                'checkbox' => 0,
93
-                'default' => 0,
94
-                'range' => [
95
-                    'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
96
-                ],
97
-            ],
98
-        ],
99
-        'endtime' => [
100
-            'exclude' => 1,
101
-            'l10n_mode' => 'mergeIfNotBlank',
102
-            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
103
-            'config' => [
104
-                'type' => 'input',
105
-                'size' => 13,
106
-                'max' => 20,
107
-                'eval' => 'datetime',
108
-                'checkbox' => 0,
109
-                'default' => 0,
110
-                'range' => [
111
-                    'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
112
-                ],
113
-            ],
114
-        ],
115
-        'date' => [
116
-            'exclude' => 1,
117
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.date',
118
-            'config' => [
119
-                'type' => 'input',
120
-                'size' => 13,
121
-                'max' => 20,
122
-                'eval' => 'date',
123
-                'checkbox' => 0,
124
-                'default' => 0,
125
-                'range' => [
126
-                    'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
127
-                ],
128
-            ],
129
-        ],
130
-        'course' => [
131
-            'exclude' => 1,
132
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.course',
133
-            'config' => [
134
-                'type' => 'select',
135
-                'renderType' => 'selectSingle',
136
-                'foreign_table' => 'tx_golfcourses_domain_model_golfcourse',
137
-                'foreign_table_where' => 'ORDER BY tx_golfcourses_domain_model_golfcourse.name',
138
-            ],
139
-        ],
140
-        'par' => [
141
-            'exclude' => 1,
142
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.par',
143
-            'config' => [
144
-                'type' => 'input',
145
-                'size' => 4,
146
-                'eval' => 'trim'
147
-            ],
148
-        ],
149
-        'strokes' => [
150
-            'exclude' => 1,
151
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.strokes',
152
-            'config' => [
153
-                'type' => 'input',
154
-                'size' => 4,
155
-                'eval' => 'trim'
156
-            ],
157
-        ],
158
-        'regulation' => [
159
-            'exclude' => 1,
160
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.regulation',
161
-            'config' => [
162
-                'type' => 'check',
163
-                'default' => 0
164
-            ],
165
-        ],
166
-        'score' => [
167
-            'exclude' => 1,
168
-            'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.score',
169
-            'config' => [
170
-                'type' => 'input',
171
-                'size' => 4,
172
-                'eval' => 'trim',
173
-                'readOnly' =>1,
174
-            ],
175
-        ],
176
-    ],
13
+		'languageField' => 'sys_language_uid',
14
+		'transOrigPointerField' => 'l10n_parent',
15
+		'transOrigDiffSourceField' => 'l10n_diffsource',
16
+		'delete' => 'deleted',
17
+		'enablecolumns' => [
18
+			'disabled' => 'hidden',
19
+			'starttime' => 'starttime',
20
+			'endtime' => 'endtime',
21
+		],
22
+		'searchFields' => 'date,course,par,strokes,score',
23
+		'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('golf_courses') . 'Resources/Public/Icons/tx_golfcourses_domain_model_golfround.png'
24
+	],
25
+	'interface' => [
26
+		'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, course, par, strokes, regulation, score',
27
+	],
28
+	'types' => [
29
+		'1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, date, course, par, strokes, regulation, score, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
30
+	],
31
+	'palettes' => [
32
+		'1' => ['showitem' => ''],
33
+	],
34
+	'columns' => [
35
+		'sys_language_uid' => [
36
+			'exclude' => 1,
37
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
38
+			'config' => [
39
+				'type' => 'select',
40
+				'renderType' => 'selectSingle',
41
+				'foreign_table' => 'sys_language',
42
+				'foreign_table_where' => 'ORDER BY sys_language.title',
43
+				'items' => [
44
+					['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1],
45
+					['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0]
46
+				],
47
+			],
48
+		],
49
+		'l10n_parent' => [
50
+			'displayCond' => 'FIELD:sys_language_uid:>:0',
51
+			'exclude' => 1,
52
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
53
+			'config' => [
54
+				'type' => 'select',
55
+				'renderType' => 'selectSingle',
56
+				'items' => [
57
+					['', 0],
58
+				],
59
+				'foreign_table' => 'tx_golfcourses_domain_model_golfround',
60
+				'foreign_table_where' => 'AND tx_golfcourses_domain_model_golfround.pid=###CURRENT_PID### AND tx_golfcourses_domain_model_golfround.sys_language_uid IN (-1,0)',
61
+			],
62
+		],
63
+		'l10n_diffsource' => [
64
+			'config' => [
65
+				'type' => 'passthrough',
66
+			],
67
+		],
68
+		't3ver_label' => [
69
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
70
+			'config' => [
71
+				'type' => 'input',
72
+				'size' => 30,
73
+				'max' => 255,
74
+			]
75
+		],
76
+		'hidden' => [
77
+			'exclude' => 1,
78
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
79
+			'config' => [
80
+				'type' => 'check',
81
+			],
82
+		],
83
+		'starttime' => [
84
+			'exclude' => 1,
85
+			'l10n_mode' => 'mergeIfNotBlank',
86
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
87
+			'config' => [
88
+				'type' => 'input',
89
+				'size' => 13,
90
+				'max' => 20,
91
+				'eval' => 'datetime',
92
+				'checkbox' => 0,
93
+				'default' => 0,
94
+				'range' => [
95
+					'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
96
+				],
97
+			],
98
+		],
99
+		'endtime' => [
100
+			'exclude' => 1,
101
+			'l10n_mode' => 'mergeIfNotBlank',
102
+			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
103
+			'config' => [
104
+				'type' => 'input',
105
+				'size' => 13,
106
+				'max' => 20,
107
+				'eval' => 'datetime',
108
+				'checkbox' => 0,
109
+				'default' => 0,
110
+				'range' => [
111
+					'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
112
+				],
113
+			],
114
+		],
115
+		'date' => [
116
+			'exclude' => 1,
117
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.date',
118
+			'config' => [
119
+				'type' => 'input',
120
+				'size' => 13,
121
+				'max' => 20,
122
+				'eval' => 'date',
123
+				'checkbox' => 0,
124
+				'default' => 0,
125
+				'range' => [
126
+					'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
127
+				],
128
+			],
129
+		],
130
+		'course' => [
131
+			'exclude' => 1,
132
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.course',
133
+			'config' => [
134
+				'type' => 'select',
135
+				'renderType' => 'selectSingle',
136
+				'foreign_table' => 'tx_golfcourses_domain_model_golfcourse',
137
+				'foreign_table_where' => 'ORDER BY tx_golfcourses_domain_model_golfcourse.name',
138
+			],
139
+		],
140
+		'par' => [
141
+			'exclude' => 1,
142
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.par',
143
+			'config' => [
144
+				'type' => 'input',
145
+				'size' => 4,
146
+				'eval' => 'trim'
147
+			],
148
+		],
149
+		'strokes' => [
150
+			'exclude' => 1,
151
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.strokes',
152
+			'config' => [
153
+				'type' => 'input',
154
+				'size' => 4,
155
+				'eval' => 'trim'
156
+			],
157
+		],
158
+		'regulation' => [
159
+			'exclude' => 1,
160
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.regulation',
161
+			'config' => [
162
+				'type' => 'check',
163
+				'default' => 0
164
+			],
165
+		],
166
+		'score' => [
167
+			'exclude' => 1,
168
+			'label' => 'LLL:EXT:golf_courses/Resources/Private/Language/locallang_db.xlf:tx_golfcourses_domain_model_golfround.score',
169
+			'config' => [
170
+				'type' => 'input',
171
+				'size' => 4,
172
+				'eval' => 'trim',
173
+				'readOnly' =>1,
174
+			],
175
+		],
176
+	],
177 177
 ];
178 178
\ No newline at end of file
Please login to merge, or discard this patch.