original_string: public function getActiveSiteTheme($siteId)
      {
          $qb = $this->getEntityManager()->createQueryBuilder();
          /** @var $query \Doctrine\ORM\Query */
  
          $query = $qb->select('e, t')
              ->from($this->_entity, 'e')
              ->innerJoin('e.themeId', 't')
              ->where('e.siteId = :id')
              ->andWhere('e.isActive = 1')
              ->setMaxResults(1)
              ->setParameter('id', $siteId)
              ->getQuery();
  
          /** @var $result \PageBuilder\Entity\Join\SiteTheme */
          $result = $query->getOneOrNullResult(AbstractQuery::HYDRATE_OBJECT);
          if ($result) {
              return $result->getThemeId();
          } else {
              return $result;
          }
      }
code: public function getActiveSiteTheme($siteId)
      {
          $qb = $this->getEntityManager()->createQueryBuilder();
          /** @var $query \Doctrine\ORM\Query */
  
          $query = $qb->select('e, t')
              ->from($this->_entity, 'e')
              ->innerJoin('e.themeId', 't')
              ->where('e.siteId = :id')
              ->andWhere('e.isActive = 1')
              ->setMaxResults(1)
              ->setParameter('id', $siteId)
              ->getQuery();
  
          /** @var $result \PageBuilder\Entity\Join\SiteTheme */
          $result = $query->getOneOrNullResult(AbstractQuery::HYDRATE_OBJECT);
          if ($result) {
              return $result->getThemeId();
          } else {
              return $result;
          }
      }
code_tokens: public function getActiveSiteTheme ( $ siteId ) { $ qb = $ this -> getEntityManager ( ) -> createQueryBuilder ( ) ; /** @var $query \Doctrine\ORM\Query */ $ query = $ qb -> select ( 'e, t' ) -> from ( $ this -> _entity , 'e' ) -> innerJoin ( 'e.themeId' , 't' ) -> where ( 'e.siteId = :id' ) -> andWhere ( 'e.isActive = 1' ) -> setMaxResults ( 1 ) -> setParameter ( 'id' , $ siteId ) -> getQuery ( ) ; /** @var $result \PageBuilder\Entity\Join\SiteTheme */ $ result = $ query -> getOneOrNullResult ( AbstractQuery :: HYDRATE_OBJECT ) ; if ( $ result ) { return $ result -> getThemeId ( ) ; } else { return $ result ; } }
docstring: Get Active Site Theme
  
  @param $siteId
  
  @return \PageBuilder\Entity\Join\SiteTheme
docstring_tokens: Get Active Site Theme