src/FelixOnline/Core/Topic.php
public function getStartDate()
    {
        $topic = BaseManager::build('FelixOnline\Core\Topic', 'article_topic', 'topic')
            ->filter('topic = "%s"', array($this->getSlug()));

        $article = BaseManager::build('FelixOnline\Core\Article', 'article', 'id')
            ->join($topic, 'LEFT', 'id', 'article')
            ->filter('published > 0')
            ->order('published', 'ASC')
            ->limit(0, 1)
            ->values();

        if (!$article) {
            throw new \FelixOnline\Exceptions\InternalException('No articles posted in this topic');
        }

        return($article[0]->getPublished());
    }
public function getStartDate()
    {
        $topic = BaseManager::build('FelixOnline\Core\Topic', 'article_topic', 'topic')
            ->filter('topic = "%s"', array($this->getSlug()));

        $article = BaseManager::build('FelixOnline\Core\Article', 'article', 'id')
            ->join($topic, 'LEFT', 'id', 'article')
            ->filter('published > 0')
            ->order('published', 'ASC')
            ->limit(0, 1)
            ->values();

        if (!$article) {
            throw new \FelixOnline\Exceptions\InternalException('No articles posted in this topic');
        }

        return($article[0]->getPublished());
    }
public function getStartDate ( ) { $ topic = BaseManager :: build ( 'FelixOnline\Core\Topic' , 'article_topic' , 'topic' ) -> filter ( 'topic = "%s"' , array ( $ this -> getSlug ( ) ) ) ; $ article = BaseManager :: build ( 'FelixOnline\Core\Article' , 'article' , 'id' ) -> join ( $ topic , 'LEFT' , 'id' , 'article' ) -> filter ( 'published > 0' ) -> order ( 'published' , 'ASC' ) -> limit ( 0 , 1 ) -> values ( ) ; if ( ! $ article ) { throw new \ FelixOnline \ Exceptions \ InternalException ( 'No articles posted in this topic' ) ; } return ( $ article [ 0 ] -> getPublished ( ) ) ; }
Get date that the first article was posted
Get date that the first article was posted