private function getUserRelatedEntities($user)
    {
        $relatedEntities =array();

        $reflectionClass = ClassUtils::newReflectionObject($user);

        if ($reflectionClass->hasMethod('getMainProfile')) {
            $userProfile = $user->getMainProfile();
            $relatedEntities =  $userProfile ? array($userProfile) : array();
        }

        return $relatedEntities;
    }