简体   繁体   中英

TYPO3 Extbase: How to access “modified” flag of my object property?

I frequently use the Extbase DebugUtility ( Tx_Extbase_Utility_Debugger::var_dump($object) ). It displays additional data for each property, especially the "modified" flag - see screenshot.

How can I access this "meta property" from within my controller (updateAction)? I tried $object->getProperty->isModified and other combinations, to no avail.

在此输入图像描述

There is a method $yourObject->_isDirty("propertyName") which returns true if it has been modified (see documentation ).

If your property is a collection itself, then just use $yourObject->getWhatevers()->_isDirty() (see documentation ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM