‪TYPO3CMS  10.4
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\BlogExample\Domain\Model\Blog ExtbaseTeam\BlogExample\Domain\Model\Comment ExtbaseTeam\BlogExample\Domain\Model\DateExample ExtbaseTeam\BlogExample\Domain\Model\DateTimeImmutableExample ExtbaseTeam\BlogExample\Domain\Model\Info ExtbaseTeam\BlogExample\Domain\Model\Person ExtbaseTeam\BlogExample\Domain\Model\Post ExtbaseTeam\BlogExample\Domain\Model\TtContent OliverHader\IrreTutorial\Domain\Model\Content OliverHader\IrreTutorial\Domain\Model\Hotel OliverHader\IrreTutorial\Domain\Model\Offer OliverHader\IrreTutorial\Domain\Model\Price TYPO3\CMS\Belog\Domain\Model\LogEntry TYPO3\CMS\Belog\Domain\Model\Workspace TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup TYPO3\CMS\Beuser\Domain\Model\Demand TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection 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\FileMount TYPO3\CMS\Extbase\Domain\Model\FrontendUser TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup TYPO3\CMS\Extbase\Tests\Fixture\Entity TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Domain\Model\Model TYPO3\CMS\Extbase\Tests\Functional\Validation\Fixture\Domain\Model\AnotherModel TYPO3\CMS\Extbase\Tests\Functional\Validation\Fixture\Domain\Model\Model 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\Extensionmanager\Domain\Model\Dependency TYPO3\CMS\Extensionmanager\Domain\Model\Extension TYPO3\CMS\Extensionmanager\Domain\Model\Mirrors TYPO3\CMS\Extensionmanager\Domain\Model\Repository TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ExtendsAbstractEntity 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 331 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 220 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 233 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 133 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder\convertTransientObjectToArray(), and TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getUidOfAlreadyPersistedValueObject().

◆ _getProperty()

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

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

Parameters
string$propertyName
Returns
‪mixed The propertyValue

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 122 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy\_loadRealInstance().

◆ _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 151 of file AbstractDomainObject.php.

Referenced by 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 310 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 245 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperties(), TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperty(), 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 162 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 196 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 323 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 272 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().