Feature: #86964 - Allow getting class property default value¶
See forge#86964
Description¶
It is now possible to get the default value of a class property when using the TYPO3\CMS\Extbase\Reflection\ReflectionService
.
class MyClass
{
public $myProperty = 'foo';
}
$property = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class)
->getClassSchema(MyClass::class)
->getProperty('myProperty');
$defaultValue = $property->getDefaultValue(); // "foo"