concrete/src/Entity/File/File.php
public function getRecentVersion()
    {
        $em = \ORM::entityManager();
        $r = $em->getRepository('\Concrete\Core\Entity\File\Version');

        return $r->findOneBy(
            ['file' => $this],
            ['fvID' => 'desc']
        );
    }
public function getRecentVersion()
    {
        $em = \ORM::entityManager();
        $r = $em->getRepository('\Concrete\Core\Entity\File\Version');

        return $r->findOneBy(
            ['file' => $this],
            ['fvID' => 'desc']
        );
    }
public function getRecentVersion ( ) { $ em = \ ORM :: entityManager ( ) ; $ r = $ em -> getRepository ( '\Concrete\Core\Entity\File\Version' ) ; return $ r -> findOneBy ( [ 'file' => $ this ] , [ 'fvID' => 'desc' ] ) ; }
Returns the most recent FileVersion object.

@return Version
Returns the most recent FileVersion object .