<?php
/**
 * @version        1.7.6
 * @package        Joomla
 * @subpackage     EDocman
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2011 - 2024 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */

defined('_JEXEC') or die;

class EDocmanModelSearch extends EDocmanModelList
{
	/**
	 * Instantiate the model.
	 *
	 * @param array $config configuration data for the model
	 *
	 */

	public function __construct($config = array())
	{
        $config['remember_states'] = false;

		parent::__construct($config);

		$this->state->insert('filter_category_id', 'int', 0)
                    ->insert('filter_search', 'string', '')
                    ->insert('filter_tag', 'string', '')
					->insert('filter_filetype','string','')
					->insert('show_category','int', 1);

		require_once JPATH_COMPONENT. '/helper/helper.php';
		$exclude_categories = EdocmanHelper::getConfigValue('exclude_categories');
		if($exclude_categories != "")
		{
			$this->state->insert('exclude_category_ids','string', $exclude_categories);
		}
	}
}