[BUGFIX] ReflectionService rejects classSchema for custom models
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 19 Feb 2013 20:34:31 +0000 (21:34 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 20 Feb 2013 19:38:32 +0000 (20:38 +0100)
The Extbase ReflectionService rejects to build a classSchema for
classes not extending AbstractEntity or AbstractValueObject.
Therefor it is not possible to use own Model constructs, that are
not persisted.

The according TYPO3 Flow class does not contain the restriction
to this inheritence/annotation.

Fixes: #45622
Releases: 6.0, 6.1
Change-Id: I46362d3d708f5b5e7e52f7ab0d17ed92a991a558
Reviewed-on: https://review.typo3.org/18383
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Markus Günther
Tested-by: Markus Günther
typo3/sysext/extbase/Classes/Reflection/ReflectionService.php

index 90973d3..02d2e6d 100644 (file)
@@ -436,8 +436,6 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
                        }
                } elseif (is_subclass_of($className, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject')) {
                        $classSchema->setModelType(\TYPO3\CMS\Extbase\Reflection\ClassSchema::MODELTYPE_VALUEOBJECT);
-               } else {
-                       return NULL;
                }
                foreach ($this->getClassPropertyNames($className) as $propertyName) {
                        if (!$this->isPropertyTaggedWith($className, $propertyName, 'transient') && $this->isPropertyTaggedWith($className, $propertyName, 'var')) {