public function configurationObjectAfter(GetConfigurationObjectDTO $serviceDataTransferObject)
    {
        // Will save the paths of the properties which need their parent objects.
        $this->delay(
            self::PRIORITY_SAVE_OBJECTS_WITH_PARENTS_PATHS,
            function (GetConfigurationObjectDTO $serviceDataTransferObject) {
                if (false === empty($this->objectsWithParentsPaths)) {
                    $serviceDataTransferObject->getResult()
                        ->setInternalVar('objectsWithParentsPaths', $this->objectsWithParentsPaths);

                    $this->objectsWithParentsPaths = [];
                }
            }
        );

        // Will fill all the parents.
        $this->delay(
            self::PRIORITY_FILL_PARENTS,
            function (GetConfigurationObjectDTO $serviceDataTransferObject) {
                $objectsWithParentsPaths = $serviceDataTransferObject->getResult()->getInternalVar('objectsWithParentsPaths');

                if (false === empty($objectsWithParentsPaths)) {
                    $object = $serviceDataTransferObject->getResult()->getObject(true);

                    foreach ($objectsWithParentsPaths as $path) {
                        $this->insertParents($object, explode('.', $path), [$object]);
                    }
                }
            }
        );
    }
public function configurationObjectAfter(GetConfigurationObjectDTO $serviceDataTransferObject)
    {
        // Will save the paths of the properties which need their parent objects.
        $this->delay(
            self::PRIORITY_SAVE_OBJECTS_WITH_PARENTS_PATHS,
            function (GetConfigurationObjectDTO $serviceDataTransferObject) {
                if (false === empty($this->objectsWithParentsPaths)) {
                    $serviceDataTransferObject->getResult()
                        ->setInternalVar('objectsWithParentsPaths', $this->objectsWithParentsPaths);

                    $this->objectsWithParentsPaths = [];
                }
            }
        );

        // Will fill all the parents.
        $this->delay(
            self::PRIORITY_FILL_PARENTS,
            function (GetConfigurationObjectDTO $serviceDataTransferObject) {
                $objectsWithParentsPaths = $serviceDataTransferObject->getResult()->getInternalVar('objectsWithParentsPaths');

                if (false === empty($objectsWithParentsPaths)) {
                    $object = $serviceDataTransferObject->getResult()->getObject(true);

                    foreach ($objectsWithParentsPaths as $path) {
                        $this->insertParents($object, explode('.', $path), [$object]);
                    }
                }
            }
        );
    }
public function configurationObjectAfter ( GetConfigurationObjectDTO $ serviceDataTransferObject ) { // Will save the paths of the properties which need their parent objects. $ this -> delay ( self :: PRIORITY_SAVE_OBJECTS_WITH_PARENTS_PATHS , function ( GetConfigurationObjectDTO $ serviceDataTransferObject ) { if ( false === empty ( $ this -> objectsWithParentsPaths ) ) { $ serviceDataTransferObject -> getResult ( ) -> setInternalVar ( 'objectsWithParentsPaths' , $ this -> objectsWithParentsPaths ) ; $ this -> objectsWithParentsPaths = [ ] ; } } ) ; // Will fill all the parents. $ this -> delay ( self :: PRIORITY_FILL_PARENTS , function ( GetConfigurationObjectDTO $ serviceDataTransferObject ) { $ objectsWithParentsPaths = $ serviceDataTransferObject -> getResult ( ) -> getInternalVar ( 'objectsWithParentsPaths' ) ; if ( false === empty ( $ objectsWithParentsPaths ) ) { $ object = $ serviceDataTransferObject -> getResult ( ) -> getObject ( true ) ; foreach ( $ objectsWithParentsPaths as $ path ) { $ this -> insertParents ( $ object , explode ( '.' , $ path ) , [ $ object ] ) ; } } } ) ; }
This function will first save the entire storage of properties paths set
in the function `objectConversionAfter`.

Then, each of the properties above will be processed to fill their parent
objects.

@param GetConfigurationObjectDTO $serviceDataTransferObject
This function will first save the entire storage of properties paths set in the function objectConversionAfter .