TYPO3  7.6
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
ElementEntity Class Reference

Public Member Functions

 __construct ($table, $id, array $data=array(),\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 20 of file ElementEntity.php.

Constructor & Destructor Documentation

__construct (   $table,
  $id,
array  $data = array(),
\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 92 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 200 of file ElementEntity.php.

getChildren ( )

Gets all child references.

Returns
array|ReferenceEntity[]

Definition at line 220 of file ElementEntity.php.

References ElementEntity\$children, $GLOBALS, and ElementEntity\getDependency().

Referenced by ElementEntity\hasReferences().

getData ( )

Gets the data.

Returns
array

Definition at line 152 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 163 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 210 of file ElementEntity.php.

References ElementEntity\$dependency.

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

getId ( )
static getIdentifier (   $table,
  $id 
)
static

Converts the object for string representation.

Parameters
string$table
int$id
Returns
string

Definition at line 348 of file ElementEntity.php.

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

getParents ( )

Gets all parent references.

Returns
array|ReferenceEntity[]

Definition at line 259 of file ElementEntity.php.

References $GLOBALS, ElementEntity\$parents, and ElementEntity\getDependency().

Referenced by ElementEntity\hasReferences().

getRecord ( )

Gets the database record of this element.

Returns
array

Definition at line 358 of file ElementEntity.php.

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

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

getTable ( )
hasDataValue (   $key)

Determines whether a particular key holds data.

Parameters
string$key
Returns
bool

Definition at line 190 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 290 of file ElementEntity.php.

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

isInvalid ( )
Returns
bool

Definition at line 112 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 179 of file ElementEntity.php.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

setId (   $id)

Sets the id.

Parameters
int$id

Definition at line 142 of file ElementEntity.php.

References ElementEntity\$id.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

setInvalid (   $invalid)
Parameters
bool$invalid

Definition at line 104 of file ElementEntity.php.

References ElementEntity\$invalid.

Referenced by ElementEntityProcessor\createNewDependentElementCallback().

Member Data Documentation

$children
protected

Definition at line 62 of file ElementEntity.php.

Referenced by ElementEntity\getChildren().

$data
protected

Definition at line 47 of file ElementEntity.php.

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

$dependency
protected

Definition at line 57 of file ElementEntity.php.

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

$id
protected
$invalid = false
protected

Definition at line 32 of file ElementEntity.php.

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

$nestedChildren
protected

Definition at line 82 of file ElementEntity.php.

$outerMostParent
protected

Definition at line 77 of file ElementEntity.php.

$parents
protected

Definition at line 67 of file ElementEntity.php.

Referenced by ElementEntity\getParents().

$record
protected

Definition at line 52 of file ElementEntity.php.

Referenced by ElementEntity\getRecord().

$table
protected
$traversingParents = false
protected

Definition at line 72 of file ElementEntity.php.

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

Definition at line 24 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

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

Definition at line 25 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

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

Definition at line 26 of file ElementEntity.php.

Referenced by CollectionService\getDependencyResolver().

const REFERENCES_ChildOf = 'childOf'

Definition at line 22 of file ElementEntity.php.

const REFERENCES_ParentOf = 'parentOf'

Definition at line 23 of file ElementEntity.php.

const RESPONSE_Skip = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity->skip'