public function isPublished()
    {
        return $this->getStartedAt()
            && $this->getStartedAt()->getTimestamp() <= time()
            && (!$this->getEndedAt() || $this->getEndedAt()->getTimestamp() >= time());
    }
public function isPublished()
    {
        return $this->getStartedAt()
            && $this->getStartedAt()->getTimestamp() <= time()
            && (!$this->getEndedAt() || $this->getEndedAt()->getTimestamp() >= time());
    }
public function isPublished ( ) { return $ this -> getStartedAt ( ) && $ this -> getStartedAt ( ) -> getTimestamp ( ) <= time ( ) && ( ! $ this -> getEndedAt ( ) || $ this -> getEndedAt ( ) -> getTimestamp ( ) >= time ( ) ) ; }
Check if element is published

@author Vincent CHALAMON <vincentchalamon@gmail.com>
@return bool
Check if element is published