<?php 
defined('_JEXEC') or die('Restricted access');

/**
* @package OS CCK
* @copyright 2020 OrdaSoft.
* @author Andrey Kvasnevskiy(akbet@mail.ru),Roman Akoev (akoevroman@gmail.com)
* @link http://ordasoft.com/cck-content-construction-kit-for-joomla.html
* @description OrdaSoft Content Construction Kit
*/


class ViewCategory
{

    static function showCategories($option, $categories ,$layout , $layout_params, $Itemid, $cat_all, $params, $menu, $category_layout){
			global $db,$os_cck_configuration,$moduleId, $my, $moduleId, $layouts_type;
			$type = 'all_categories';
                        
			require getLayoutPathCCK::getLayoutPathCom($option,$type);
    }

    static function showSearch($option, $layout, $layout_params, $button_style=''){
    

      global $app, $db, $acl, $user, $Itemid, $os_cck_configuration, $limit, $total, $limitstart,$moduleId,$entityFieldLists;

      $fromSearch = 1;
//      $ids = array();
//        foreach($layout_params['search_params'] as $key => $var){
//          if(isset($var["fid"]) && $var["fid"] != 'price_search')$ids[] = $var["fid"];
//      }
      $fields = $entityFieldLists[$layout->fk_eid];
//      if(count($ids)){
//        $ids = implode(",", $ids);
//        $query="SELECT ef.* FROM #__os_cck_entity_field as ef WHERE ef.fid IN($ids)";
//        $db->setQuery($query);
////        echo $query; exit;
//        $fields = $db->loadObjectList("fid");
//      }

    
      $type = 'show_search';
      
      require getLayoutPathCCK::getLayoutPathCom($option, $type);
    }


    static function displayCategory($option, $instancies, $catid, $categories, $currentcat,
                                $is_exist_sub_categories, $layout, $layout_params, $pageNav, $entity_type = ''){
      global $db, $os_cck_configuration,$moduleId,$params, $Itemid, $my, $session;
      $type = 'category';
      require getLayoutPathCCK::getLayoutPathCom($option, $type);
    } //end function

}
