getTypeName() public method

public getTypeName ( ) : string
return string
 public function beforeRender()
 {
     $articlesParams = array();
     foreach ((array) \ArticleType::GetArticleTypes(true) as $one_art_type_name) {
         $one_art_type = new \ArticleType($one_art_type_name);
         if ($one_art_type->getFilterStatus()) {
             $articlesParams[] = new ComparisonOperation('type', new Operator('not', 'string'), $one_art_type->getTypeName());
         }
     }
     $articlesOrders = array(array('field' => 'bylastupdate', 'dir' => 'desc'));
     $this->items = Article::GetList($articlesParams, $articlesOrders, 0, self::LIMIT, $count = 0);
 }
Example #2
0
echo $translator->trans("Article Type", array(), 'articles');
?>
:</td>
      <td>
        <select name="f_article_type" id="f_article_type" class="input_select" alt="select" emsg="<?php 
echo $translator->trans('You must select an article type.', array(), 'articles');
?>
">
        <option value=""><?php 
echo $translator->trans('---Select article type---', array(), 'articles');
?>
</option>
        <?php 
foreach ($articleTypes as $article_type) {
    $articleType = new ArticleType($article_type);
    camp_html_select_option($articleType->getTypeName(), $f_article_type, $articleType->getTypeName());
}
?>
        </select>
      </td>
    </tr>
    <tr>
      <td align="right"><?php 
echo $translator->trans("Language");
?>
:</td>
      <td>
        <select name="f_article_language_id" id="f_article_language_id" class="input_select" alt="select" emsg="<?php 
echo $translator->trans('You must select an article language.', array(), 'articles');
?>
" onchange="if (this.options[this.selectedIndex].value != <?php 
Example #3
0
            $_REQUEST['section'] = $sectionFiltersArray[3];
        }
    }
}
foreach ($filters as $name => $opts) {
    if (isset($_REQUEST[$name]) && (!empty($_REQUEST[$name]) || $_REQUEST[$name] === 0)) {
        $field = !empty($fields[$name]) ? $fields[$name] : $name;
        $articlesParams[] = new ComparisonOperation($field, new Operator($opts[0], $opts[1]), $_REQUEST[$name]);
    }
}
if (empty($_REQUEST['showtype']) || $_REQUEST['showtype'] != 'with_filtered') {
    // limit articles of filtered types by default
    foreach ((array) \ArticleType::GetArticleTypes(true) as $one_art_type_name) {
        $one_art_type = new \ArticleType($one_art_type_name);
        if ($one_art_type->getFilterStatus()) {
            $articlesParams[] = new ComparisonOperation('type', new Operator('not', 'string'), $one_art_type->getTypeName());
        }
    }
}
// search
if (isset($_REQUEST['sSearch']) && strlen($_REQUEST['sSearch']) > 0) {
    $search_phrase = $_REQUEST['sSearch'];
    //$articlesParams[] = new ComparisonOperation('search_phrase', new Operator('is', 'integer'), $search_phrase);
    $articlesParams[] = new ComparisonOperation('search_phrase', new Operator('like', 'string'), "__match_all." . $search_phrase);
}
// sorting
$cols = $list->getColumnKeys();
$sortOptions = array('Number' => 'bynumber', 'Order' => 'bysectionorder', 'Name' => 'byname', 'Comments' => 'bycomments', 'Reads' => 'bypopularity', 'CreateDate' => 'bycreationdate', 'PublishDate' => 'bypublishdate');
$sortBy = 'bysectionorder';
$sortDir = 'asc';
$sortingCols = min(1, (int) $_REQUEST['iSortingCols']);