TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ElementEntity Class Reference

Public Member Functions

 __construct ($table, $id, array $data=[],\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency)
 
 setInvalid ($invalid)
 
 isInvalid ()
 
 getTable ()
 
 getId ()
 
 setId ($id)
 
 getData ()
 
 getDataValue ($key)
 
 setDataValue ($key, $value)
 
 hasDataValue ($key)
 
 __toString ()
 
 getDependency ()
 
 getChildren ()
 
 getParents ()
 
 hasReferences ()
 
 getRecord ()
 

Static Public Member Functions

static getIdentifier ($table, $id)
 

Public Attributes

const REFERENCES_ChildOf = 'childOf'
 
const REFERENCES_ParentOf = 'parentOf'
 
const EVENT_Construct = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::construct'
 
const EVENT_CreateChildReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createChildReference'
 
const EVENT_CreateParentReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createParentReference'
 
const RESPONSE_Skip = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity->skip'
 

Protected Attributes

 $invalid = false
 
 $table
 
 $id
 
 $data
 
 $record
 
 $dependency
 
 $children
 
 $parents
 
 $traversingParents = false
 
 $outerMostParent
 
 $nestedChildren
 

Detailed Description

Object to hold information on a dependent database element in abstract.

Definition at line 22 of file ElementEntity.php.

Constructor & Destructor Documentation

__construct (   $table,
  $id,
array  $data = [],
\TYPO3\CMS\Version\Dependency\DependencyResolver  $dependency 
)

Creates this object.

Parameters
string$table
int$id
array$data(optional)
\TYPO3\CMS\Version\Dependency\DependencyResolver$dependency

Definition at line 94 of file ElementEntity.php.

References ElementEntity\$data, ElementEntity\$dependency, ElementEntity\$id, and ElementEntity\$table.

Member Function Documentation

__toString ( )

Converts this object for string representation.

Returns
string

Definition at line 202 of file ElementEntity.php.

getChildren ( )

Gets all child references.

Returns
array|ReferenceEntity[]

Definition at line 222 of file ElementEntity.php.

References ElementEntity\$children, ElementEntity\getDependency(), and GeneralUtility\makeInstance().

Referenced by ElementEntity\hasReferences().

getData ( )

Gets the data.

Returns
array

Definition at line 154 of file ElementEntity.php.

References ElementEntity\$data.

getDataValue (   $key)

Gets a value for a particular key from the data.

Parameters
string$key
Returns
mixed

Definition at line 165 of file ElementEntity.php.

References ElementEntity\hasDataValue().

Referenced by CommandMap\getCommonClearPropertiesCallback(), CommandMap\getCommonSetStagePropertiesCallback(), CommandMap\getCommonSwapPropertiesCallback(), and CommandMap\getElementLiveIdCallback().

getDependency ( )

Gets the parent dependency object.

Returns

Definition at line 212 of file ElementEntity.php.

References ElementEntity\$dependency.

Referenced by ElementEntity\getChildren(), and ElementEntity\getParents().

static getIdentifier (   $table,
  $id 
)
static

Converts the object for string representation.

Parameters
string$table
int$id
Returns
string

Definition at line 405 of file ElementEntity.php.

References ElementEntity\$id, and ElementEntity\$table.

getParents ( )

Gets all parent references.

Returns
array|ReferenceEntity[]

Definition at line 284 of file ElementEntity.php.

References ElementEntity\$parents, ElementEntity\getDependency(), and GeneralUtility\makeInstance().

Referenced by ElementEntity\hasReferences().

getRecord ( )

Gets the database record of this element.

Returns
array

Definition at line 415 of file ElementEntity.php.

References ElementEntity\$record, ElementEntity\getId(), ElementEntity\getTable(), and GeneralUtility\makeInstance().

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

hasDataValue (   $key)

Determines whether a particular key holds data.

Parameters
string$key
Returns
bool

Definition at line 192 of file ElementEntity.php.

Referenced by ElementEntityProcessor\createNewDependentElementCallback(), and ElementEntity\getDataValue().

hasReferences ( )

Determines whether there are child or parent references.

Returns
bool

Definition at line 347 of file ElementEntity.php.

References ElementEntity\getChildren(), and ElementEntity\getParents().

isInvalid ( )
Returns
bool

Definition at line 114 of file ElementEntity.php.

References ElementEntity\$invalid.

setDataValue (   $key,
  $value 
)

Sets a value for a particular key in the data.

Parameters
string$key
mixed$value
Returns
void

Definition at line 181 of file ElementEntity.php.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

setId (   $id)

Sets the id.

Parameters
int$id

Definition at line 144 of file ElementEntity.php.

References ElementEntity\$id.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

setInvalid (   $invalid)
Parameters
bool$invalid

Definition at line 106 of file ElementEntity.php.

References ElementEntity\$invalid.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

Member Data Documentation

$children
protected

Definition at line 64 of file ElementEntity.php.

Referenced by ElementEntity\getChildren().

$data
protected

Definition at line 49 of file ElementEntity.php.

Referenced by ElementEntity\__construct(), and ElementEntity\getData().

$dependency
protected

Definition at line 59 of file ElementEntity.php.

Referenced by ElementEntity\__construct(), and ElementEntity\getDependency().

$invalid = false
protected

Definition at line 34 of file ElementEntity.php.

Referenced by ElementEntity\isInvalid(), and ElementEntity\setInvalid().

$nestedChildren
protected

Definition at line 84 of file ElementEntity.php.

$outerMostParent
protected

Definition at line 79 of file ElementEntity.php.

$parents
protected

Definition at line 69 of file ElementEntity.php.

Referenced by ElementEntity\getParents().

$record
protected

Definition at line 54 of file ElementEntity.php.

Referenced by ElementEntity\getRecord().

$table
protected
$traversingParents = false
protected

Definition at line 74 of file ElementEntity.php.

const EVENT_Construct = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::construct'

Definition at line 26 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

const EVENT_CreateChildReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createChildReference'

Definition at line 27 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

const EVENT_CreateParentReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createParentReference'

Definition at line 28 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

const REFERENCES_ChildOf = 'childOf'

Definition at line 24 of file ElementEntity.php.

const REFERENCES_ParentOf = 'parentOf'

Definition at line 25 of file ElementEntity.php.