24 const EVENT_Construct =
'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::construct';
27 const RESPONSE_Skip =
'TYPO3\\CMS\\Version\\Dependency\\ElementEntity->skip';
97 $this->dependency->executeEventCallback(self::EVENT_Construct, $this);
138 $this->
id = (int)
$id;
172 $this->data[$key] = $value;
182 return isset($this->data[$key]);
191 return self::getIdentifier($this->table, $this->
id);
209 if (!isset($this->children)) {
210 $this->children = array();
211 $where =
'tablename=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->table,
'sys_refindex') .
' AND recuid=' 212 . $this->
id .
' AND workspace=' . $this->dependency->getWorkspace();
213 $rows =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'*',
'sys_refindex', $where,
'',
'sorting');
214 if (is_array($rows)) {
215 foreach ($rows as $row) {
216 if ($row[
'ref_table'] !==
'_FILE' && $row[
'ref_table'] !==
'_STRING') {
218 'table' => $row[
'ref_table'],
219 'id' => $row[
'ref_uid'],
220 'field' => $row[
'field'],
221 'scope' => self::REFERENCES_ChildOf
224 $callbackResponse = $this->dependency->executeEventCallback(self::EVENT_CreateChildReference, $this, $arguments);
225 if ($callbackResponse !== self::RESPONSE_Skip) {
226 $this->children[] = $this->
getDependency()->getFactory()->getReferencedElement(
247 if (!isset($this->parents)) {
248 $this->parents = array();
249 $where =
'ref_table=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->table,
'sys_refindex')
250 .
' AND deleted=0 AND ref_uid=' . $this->
id .
' AND workspace=' . $this->dependency->getWorkspace();
251 $rows =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'*',
'sys_refindex', $where,
'',
'sorting');
252 if (is_array($rows)) {
253 foreach ($rows as $row) {
254 $arguments = array(
'table' => $row[
'tablename'],
'id' => $row[
'recuid'],
'field' => $row[
'field'],
'scope' => self::REFERENCES_ParentOf);
255 $callbackResponse = $this->dependency->executeEventCallback(self::EVENT_CreateParentReference, $this, $arguments);
256 if ($callbackResponse !== self::RESPONSE_Skip) {
257 $this->parents[] = $this->
getDependency()->getFactory()->getReferencedElement(
285 public function getOuterMostParent() {
286 if (!isset($this->outerMostParent)) {
289 $this->outerMostParent = $this;
291 $this->outerMostParent = FALSE;
312 public function getNestedChildren() {
313 if (!isset($this->nestedChildren)) {
314 $this->nestedChildren = array();
318 $this->nestedChildren = array_merge($this->nestedChildren, array($child->getElement()->__toString() => $child->getElement()), $child->getElement()->getNestedChildren());
341 if (empty($this->record[
'uid']) || (
int)$this->record[
'uid'] !== $this->
getId()) {
342 $this->record = array();
343 $row =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
'uid,pid,t3ver_wsid,t3ver_state,t3ver_oid', $this->
getTable(),
'uid=' . $this->
getId());
344 if (is_array($row)) {
345 $this->record = $row;
const EVENT_CreateParentReference
setDataValue($key, $value)
static getIdentifier($table, $id)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
__construct($table, $id, array $data=array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency)
const REFERENCES_ParentOf
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
const EVENT_CreateChildReference