Newscoop\Service\Implementation\ThemeManagementServiceLocal::getCountThemes PHP Метод

getCountThemes() публичный Метод

public getCountThemes ( $publication, SearchTheme $search = NULL )
$search Newscoop\Service\Model\SearchTheme
    public function getCountThemes($publication, SearchTheme $search = NULL)
    {
        return count($this->getThemesData($publication, $search));
    }

Usage Example

Пример #1
0
 public function getCount(array $p_params = array(), array $cols = array())
 {
     $search = $this->getSearchObject();
     $p_params = (object) $p_params;
     if (isset($p_params->search)) {
         if (@trim($p_params->search[$this->_pubColFilterIdx]) != "") {
             $p = new Publication();
             $p->setId(intval($p_params->search[$this->_pubColFilterIdx]));
             try {
                 return $this->_service->getCountThemes($p, $search);
             } catch (\Exception $e) {
                 return 0;
             }
         }
         $this->search($p_params->search);
     }
     try {
         return $this->_service->getCountUnassignedThemes($search);
     } catch (\Exception $e) {
         return 0;
     }
 }