‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject:
TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface t3lib_object_tests_initializable TYPO3\CMS\Extbase\DomainObject\AbstractEntity TYPO3\CMS\Extbase\DomainObject\AbstractValueObject ExtbaseTeam\A\Domain\Model\A ExtbaseTeam\ActionControllerArgumentTest\Domain\Model\Model ExtbaseTeam\ActionControllerTest\Domain\Model\Model ExtbaseTeam\BlogExample\Domain\Model\Administrator ExtbaseTeam\BlogExample\Domain\Model\Blog ExtbaseTeam\BlogExample\Domain\Model\Category ExtbaseTeam\BlogExample\Domain\Model\Comment ExtbaseTeam\BlogExample\Domain\Model\DateExample ExtbaseTeam\BlogExample\Domain\Model\DateTimeImmutableExample ExtbaseTeam\BlogExample\Domain\Model\FrontendUserGroup ExtbaseTeam\BlogExample\Domain\Model\Info ExtbaseTeam\BlogExample\Domain\Model\Person ExtbaseTeam\BlogExample\Domain\Model\Post ExtbaseTeam\BlogExample\Domain\Model\TtContent ExtbaseTeam\TestValidators\Domain\Model\AnotherModel ExtbaseTeam\TestValidators\Domain\Model\Model TYPO3\CMS\Belog\Domain\Model\LogEntry TYPO3\CMS\Belog\Domain\Model\Workspace TYPO3\CMS\Beuser\Domain\Model\BackendUser TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder TYPO3\CMS\Extbase\Domain\Model\BackendUser TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup TYPO3\CMS\Extbase\Domain\Model\Category TYPO3\CMS\Extbase\Domain\Model\FrontendUser TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup TYPO3\CMS\Extbase\Tests\Fixture\Entity TYPO3\CMS\Extbase\Tests\Unit\Mvc\Web\Routing\Fixtures\EntityFixture TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Domain\Model\A TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Domain\Model\Entity TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity2 TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity3 TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\Fixture\DummyChildEntity TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\Fixture\DummyEntity TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Mapper\Fixture\DummyParentEntity TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjectEntityFixture TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithAllTypesOfProperties TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyEntity TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyModel TYPO3\CMS\Extbase\Tests\UnitDeprecated\Reflection\Fixture\DummyClassWithAllTypesOfProperties TYPO3\CMS\Extensionmanager\Domain\Model\Extension TYPO3\CMS\Fluid\Tests\Functional\Fixtures\ViewHelpers\ExtendsAbstractEntity TYPO3\TestIrreForeignfield\Domain\Model\Content TYPO3\TestIrreForeignfield\Domain\Model\Hotel TYPO3\TestIrreForeignfield\Domain\Model\Offer TYPO3\TestIrreForeignfield\Domain\Model\Price TYPO3Tests\ParentChildTranslation\Domain\Model\Child TYPO3Tests\ParentChildTranslation\Domain\Model\Main TYPO3Tests\ParentChildTranslation\Domain\Model\Squeeze ExtbaseTeam\BlogExample\Domain\Model\RegistryEntry ExtbaseTeam\BlogExample\Domain\Model\Tag TYPO3\CMS\Extbase\Tests\Fixture\ValueObject TYPO3\CMS\Extbase\Tests\Unit\Mvc\Web\Routing\Fixtures\ValueObjectFixture TYPO3\CMS\Extbase\Tests\Unit\Property\TypeConverter\Fixtures\PersistentObjectValueObjectFixture TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyValueObject

Public Member Functions

int null getUid ()
 
 setPid (int $pid)
 
int null getPid ()
 
bool _setProperty (string $propertyName, $propertyValue)
 
mixed _getProperty (string $propertyName)
 
array _getProperties ()
 
bool _hasProperty ($propertyName)
 
bool _isNew ()
 
 _memorizeCleanState ($propertyName=null)
 
 _memorizePropertyCleanState ($propertyName)
 
array _getCleanProperties ()
 
mixed _getCleanProperty (string $propertyName)
 
bool _isDirty ($propertyName=null)
 
bool _isClone ()
 
 _setClone ($clone)
 
 __clone ()
 
string __toString ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface
 _memorizeCleanState ()
 
bool _isDirty ()
 

Protected Member Functions

bool isPropertyDirty ($previousValue, $currentValue)
 

Protected Attributes

int $uid
 
int $_localizedUid
 
int $_languageUid
 
int $_versionedUid
 
int $pid
 

Private Attributes

bool $_isClone = false
 
array $_cleanProperties = array( )
 

Detailed Description

A generic Domain Object.

All Model domain objects need to inherit from either AbstractEntity or AbstractValueObject, as this provides important framework information.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 30 of file AbstractDomainObject.php.

Member Function Documentation

◆ __clone()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::__clone ( )

Clone method. Sets the _isClone property.

Definition at line 333 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isClone().

◆ __toString()

string TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::__toString ( )

◆ _getCleanProperties()

array TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getCleanProperties ( )

Returns a hash map of clean properties and $values.

Returns
‪array

Definition at line 222 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$_cleanProperties.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ _getCleanProperty()

mixed TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getCleanProperty ( string  $propertyName)

Returns the clean value of the given property. The returned value will be NULL if the clean state was not memorized before, or if the clean value is NULL.

Parameters
string$propertyName‪The name of the property to be memorized.
Returns
‪mixed The clean property value or NULL

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 235 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ _getProperties()

array TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getProperties ( )

Returns a hash map of property names and property values. Only for internal use.

Returns
‪array The properties

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 135 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder\convertTransientObjectToArray().

◆ _getProperty()

mixed TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getProperty ( string  $propertyName)

◆ _hasProperty()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_hasProperty (   $propertyName)

Returns the property value of the given property name. Only for internal use.

Parameters
string$propertyName
Returns
‪bool TRUE bool true if the property exists, FALSE if it doesn't exist or NULL in case of an error.

Definition at line 153 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getProperty(), TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_setProperty(), and TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\createTypedNamedParameter().

◆ _isClone()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isClone ( )

Returns TRUE if the object has been cloned, FALSE otherwise.

Returns
‪bool TRUE if the object has been cloned

Definition at line 312 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$_isClone.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\__clone(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_setClone().

◆ _isDirty()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isDirty (   $propertyName = null)

Returns TRUE if the properties were modified after reconstitution

Parameters
string$propertyName‪An optional name of a property to be checked if its value is dirty
Exceptions

Definition at line 247 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperties(), TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperty(), TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getProperty(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\isPropertyDirty().

◆ _isNew()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isNew ( )

Returns TRUE if the object is new (the uid was not set, yet). Only for internal use

Returns
‪bool

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 164 of file AbstractDomainObject.php.

◆ _memorizeCleanState()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_memorizeCleanState (   $propertyName = null)

◆ _memorizePropertyCleanState()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_memorizePropertyCleanState (   $propertyName)

Register a properties's clean state, e.g. after it has been reconstituted from the database.

Parameters
string$propertyName‪The name of the property to be memorized. If omitted all persistable properties are memorized.

Definition at line 198 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_memorizeCleanState().

◆ _setClone()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_setClone (   $clone)

Setter whether this Domain Object is a clone of another one. NEVER SET THIS PROPERTY DIRECTLY. We currently need it to make the _isDirty check inside AbstractEntity work, but it is just a work- around right now.

Parameters
bool$clone

Definition at line 325 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isClone().

◆ _setProperty()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_setProperty ( string  $propertyName,
  $propertyValue 
)

Reconstitutes a property. Only for internal use.

Parameters
string$propertyName
mixed$propertyValue
Returns
‪bool

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 106 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_hasProperty().

◆ getPid()

int null TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::getPid ( )

Getter for the pid.

Returns
‪int|null The pid or NULL if none set yet.

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 90 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$pid.

◆ getUid()

◆ isPropertyDirty()

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::isPropertyDirty (   $previousValue,
  $currentValue 
)
protected

Checks the $value against the $cleanState.

Parameters
mixed$previousValue
mixed$currentValue
Returns
‪bool

Definition at line 274 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ setPid()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::setPid ( int  $pid)

Setter for the pid.

Parameters
int$pid

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 80 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$pid.

Member Data Documentation

◆ $_cleanProperties

array TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_cleanProperties = array( )
private

An array holding the clean property values. Set right after reconstitution of the object

Definition at line 60 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperties().

◆ $_isClone

bool TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_isClone = false
private

TRUE if the object is a clone

Definition at line 56 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isClone().

◆ $_languageUid

int TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_languageUid
protected

The uid of the language of the object. This is the uid of the language record in the table sys_language.

Definition at line 42 of file AbstractDomainObject.php.

◆ $_localizedUid

int TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_localizedUid
protected

The uid of the localized record. Holds the uid of the record in default language (the translationOrigin).

Definition at line 38 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\Domain\Model\FileReference\getOriginalResource().

◆ $_versionedUid

int TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_versionedUid
protected

The uid of the versioned record.

Definition at line 46 of file AbstractDomainObject.php.

◆ $pid

int TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$pid
protected

◆ $uid

int TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$uid
protected

The uid of the record. The uid is only unique in the context of the database table.

Definition at line 34 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\Domain\Model\FileReference\getOriginalResource(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\getUid().