public function findPublishedVersionByLocator(LocatorInterface $locator)
    {
        $entity = $this->findActiveVersionByLocator($locator);

        if ($entity !== null && $entity->getStatus() === VersionStatuses::PUBLISHED) {
            return $entity;
        }

        return null;
    }
public function findPublishedVersionByLocator(LocatorInterface $locator)
    {
        $entity = $this->findActiveVersionByLocator($locator);

        if ($entity !== null && $entity->getStatus() === VersionStatuses::PUBLISHED) {
            return $entity;
        }

        return null;
    }
public function findPublishedVersionByLocator ( LocatorInterface $ locator ) { $ entity = $ this -> findActiveVersionByLocator ( $ locator ) ; if ( $ entity !== null && $ entity -> getStatus ( ) === VersionStatuses :: PUBLISHED ) { return $ entity ; } return null ; }
Finds the most recent "published" or "depublished" version of a resource
and if it is "published" returns it, otherwise returns null.

@param LocatorInterface $locator
@return VersionEntityInterface | null
Finds the most recent published or depublished version of a resource and if it is published returns it otherwise returns null .