641abb777f052535cbd1457e181a6d0cd996d701
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / QuerySettingsInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * A query settings interface. This interface is NOT part of the TYPO3.Flow API.
19 */
20 interface QuerySettingsInterface
21 {
22 /**
23 * Sets the flag if the storage page should be respected for the query.
24 *
25 * @param bool $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly.
26 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
27 * @api
28 */
29 public function setRespectStoragePage($respectStoragePage);
30
31 /**
32 * Returns the state, if the storage page should be respected for the query.
33 *
34 * @return bool TRUE, if the storage page should be respected; otherwise FALSE.
35 */
36 public function getRespectStoragePage();
37
38 /**
39 * Sets the pid(s) of the storage page(s) that should be respected for the query.
40 *
41 * @param array $storagePageIds If TRUE the storage page ID will be determined and the statement will be extended accordingly.
42 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
43 * @api
44 */
45 public function setStoragePageIds(array $storagePageIds);
46
47 /**
48 * Returns the pid(s) of the storage page(s) that should be respected for the query.
49 *
50 * @return array list of integers that each represent a storage page id
51 */
52 public function getStoragePageIds();
53
54 /**
55 * Sets the flag if a translation is chosen and language overlay should be performed.
56 *
57 * @param bool $respectSysLanguage TRUE if a translation is chosen and language overlay should be performed.
58 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
59 * @api
60 */
61 public function setRespectSysLanguage($respectSysLanguage);
62
63 /**
64 * Returns the state, if a language overlay should be performed when a translation is active.
65 *
66 * @return bool TRUE, if a language overlay should be performed when a translation is active; otherwise FALSE.
67 */
68 public function getRespectSysLanguage();
69
70 /**
71 * @param mixed $languageOverlayMode TRUE, FALSE or "hideNonTranslated"
72 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
73 * @api
74 */
75 public function setLanguageOverlayMode($languageOverlayMode);
76
77 /**
78 * @return mixed TRUE, FALSE or "hideNonTranslated"
79 */
80 public function getLanguageOverlayMode();
81
82 /**
83 * @param string $languageMode NULL, "content_fallback", "strict" or "ignore"
84 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
85 * @api
86 */
87 public function setLanguageMode($languageMode);
88
89 /**
90 * @return string NULL, "content_fallback", "strict" or "ignore"
91 */
92 public function getLanguageMode();
93
94 /**
95 * @param int $languageUid
96 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
97 * @api
98 */
99 public function setLanguageUid($languageUid);
100
101 /**
102 * @return int
103 */
104 public function getLanguageUid();
105
106 /**
107 * Sets a flag indicating whether all or some enable fields should be ignored. If TRUE, all enable fields are ignored.
108 * If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all
109 * enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
110 *
111 * @param bool $ignoreEnableFields
112 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
113 * @see setEnableFieldsToBeIgnored()
114 * @api
115 */
116 public function setIgnoreEnableFields($ignoreEnableFields);
117
118 /**
119 * The returned value indicates whether all or some enable fields should be ignored.
120 *
121 * If TRUE, all enable fields are ignored. If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored.
122 * If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
123 *
124 * @return bool
125 * @see getEnableFieldsToBeIgnored()
126 */
127 public function getIgnoreEnableFields();
128
129 /**
130 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
131 * to be ignored while building the query statement. Adding a column name here effectively switches off filtering
132 * by this column. This setting is only taken into account if $this->ignoreEnableFields = TRUE.
133 *
134 * @param array $enableFieldsToBeIgnored
135 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
136 * @see setIgnoreEnableFields()
137 * @api
138 */
139 public function setEnableFieldsToBeIgnored($enableFieldsToBeIgnored);
140
141 /**
142 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
143 * to be ignored while building the query statement.
144 *
145 * @return array
146 * @see getIgnoreEnableFields()
147 */
148 public function getEnableFieldsToBeIgnored();
149
150 /**
151 * Sets the flag if the query should return objects that are deleted.
152 *
153 * @param bool $includeDeleted
154 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
155 * @api
156 */
157 public function setIncludeDeleted($includeDeleted);
158
159 /**
160 * Returns if the query should return objects that are deleted.
161 *
162 * @return bool
163 */
164 public function getIncludeDeleted();
165 }