public function andIsOnline()
    {
        return $this->andWhere($this->getAlias().'._state IN ('.$this->expr()->literal(Page::STATE_ONLINE).','.$this->expr()->literal(Page::STATE_ONLINE + Page::STATE_HIDDEN).')')
                        ->andWhere($this->getAlias().'._publishing IS NULL OR '.$this->getAlias().'._publishing <= '.$this->expr()->literal(date(self::$config['dateSchemeForPublishing'], time())))
                        ->andWhere($this->getAlias().'._archiving IS NULL OR '.$this->getAlias().'._archiving > '.$this->expr()->literal(date(self::$config['dateSchemeForPublishing'], time())));
    }