|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de> 00006 * All rights reserved 00007 * 00008 * This class is a backport of the corresponding class of FLOW3. 00009 * All credits go to the v5 team. 00010 * 00011 * This script is part of the TYPO3 project. The TYPO3 project is 00012 * free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * The GNU General Public License can be found at 00018 * http://www.gnu.org/copyleft/gpl.html. 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 00028 /** 00029 * Query settings. This class is NOT part of the FLOW3 API. 00030 * It reflects the settings unique to TYPO3 4.x. 00031 * 00032 * @package Extbase 00033 * @subpackage Persistence 00034 * @version $Id: Typo3QuerySettings.php 1972 2010-03-08 16:59:20Z jocrau $ 00035 * @api 00036 */ 00037 class Tx_Extbase_Persistence_Typo3QuerySettings implements Tx_Extbase_Persistence_QuerySettingsInterface { 00038 00039 /** 00040 * Flag if the storage page should be respected for the query. 00041 * @var boolean 00042 */ 00043 protected $respectStoragePage = TRUE; 00044 00045 /** 00046 * the pid(s) of the storage page(s) that should be respected for the query. 00047 * @var array 00048 */ 00049 protected $storagePageIds = array(); 00050 00051 /** 00052 * Flag if the visibility settings for the frontend should be respected. 00053 * @var boolean 00054 */ 00055 protected $respectEnableFields = TRUE; 00056 00057 /** 00058 * Flag if the sys_language_uid should be respected (default is TRUE). 00059 * @var boolean 00060 */ 00061 protected $respectSysLanguage = TRUE; 00062 00063 /** 00064 * Flag if the the query result should be returned as raw QueryResult. 00065 * @var boolean 00066 */ 00067 protected $returnRawQueryResult = FALSE; 00068 00069 /** 00070 * Sets the flag if the storage page should be respected for the query. 00071 * 00072 * @param $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly. 00073 * @return $this (fluent interface) 00074 * @api 00075 */ 00076 public function setRespectStoragePage($respectStoragePage) { 00077 $this->respectStoragePage = $respectStoragePage; 00078 return $this; 00079 } 00080 00081 /** 00082 * Returns the state, if the storage page should be respected for the query. 00083 * 00084 * @return boolean TRUE, if the storage page should be respected; otherwise FALSE. 00085 */ 00086 public function getRespectStoragePage() { 00087 return $this->respectStoragePage; 00088 } 00089 00090 /** 00091 * Sets the pid(s) of the storage page(s) that should be respected for the query. 00092 * 00093 * @param array $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly. 00094 * @return Tx_Extbase_Persistence_QuerySettingsInterface instance of $this to allow method chaining 00095 * @api 00096 */ 00097 public function setStoragePageIds(array $storagePageIds) { 00098 $this->storagePageIds = $storagePageIds; 00099 } 00100 00101 /** 00102 * Returns the pid(s) of the storage page(s) that should be respected for the query. 00103 * 00104 * @return array list of integers that each represent a storage page id 00105 */ 00106 public function getStoragePageIds() { 00107 return $this->storagePageIds; 00108 } 00109 00110 /** 00111 * Sets the flag if a and language overlay should be performed. 00112 * 00113 * @param $respectEnableFields TRUE if a and language overlay should be performed. 00114 * @return $this (fluent interface) 00115 * @api 00116 */ 00117 public function setRespectSysLanguage($respectSysLanguage) { 00118 $this->respectSysLanguage = $respectSysLanguage; 00119 return $this; 00120 } 00121 00122 /** 00123 * Returns the state, if a and language overlay should be performed. 00124 * 00125 * @return boolean TRUE, if a and language overlay should be performed; otherwise FALSE. 00126 */ 00127 public function getRespectSysLanguage() { 00128 return $this->respectSysLanguage; 00129 } 00130 00131 /** 00132 * Sets the flag if the visibility in the frontend should be respected. 00133 * 00134 * @param $respectEnableFields TRUE if the visibility in the frontend should be respected. If TRUE, the "enable fields" of TYPO3 will be added to the query statement. 00135 * @return $this (fluent interface) 00136 * @api 00137 */ 00138 public function setRespectEnableFields($respectEnableFields) { 00139 $this->respectEnableFields = $respectEnableFields; 00140 return $this; 00141 } 00142 00143 /** 00144 * Returns the state, if the visibility settings for the frontend should be respected for the query. 00145 * 00146 * @return boolean TRUE, if the visibility settings for the frontend should should be respected; otherwise FALSE. 00147 */ 00148 public function getRespectEnableFields() { 00149 return $this->respectEnableFields; 00150 } 00151 00152 /** 00153 * Sets the state, if the QueryResult should be returned unmapped. 00154 * 00155 * @var boolean $returnRawQueryResult TRUE, if the QueryResult should be returned unmapped; otherwise FALSE. 00156 * @return void 00157 */ 00158 public function setReturnRawQueryResult($returnRawQueryResult) { 00159 $this->returnRawQueryResult = $returnRawQueryResult; 00160 } 00161 00162 /** 00163 * Returns the state, if the QueryResult should be returned unmapped. 00164 * 00165 * @return boolean TRUE, if the QueryResult should be returned unmapped; otherwise FALSE. 00166 */ 00167 public function getReturnRawQueryResult() { 00168 return $this->returnRawQueryResult; 00169 } 00170 00171 } 00172 ?>
1.8.0