public function findProfile($profileId)
    {
        $application = $this->findOneBy(array('isDraft' => null, 'profiles._id' => new \MongoId($profileId)));
        foreach ($application->getProfiles() as $profile) {
            if ($profile->getId() == $profileId) {
                return $profile;
            }
        }
        return null;
    }
public function findProfile($profileId)
    {
        $application = $this->findOneBy(array('isDraft' => null, 'profiles._id' => new \MongoId($profileId)));
        foreach ($application->getProfiles() as $profile) {
            if ($profile->getId() == $profileId) {
                return $profile;
            }
        }
        return null;
    }
public function findProfile ( $ profileId ) { $ application = $ this -> findOneBy ( array ( 'isDraft' => null , 'profiles._id' => new \ MongoId ( $ profileId ) ) ) ; foreach ( $ application -> getProfiles ( ) as $ profile ) { if ( $ profile -> getId ( ) == $ profileId ) { return $ profile ; } } return null ; }
Gets social profiles of an application

@param String $profileId
@return $profile|NULL
Gets social profiles of an application