Source for file search.php
Documentation is available at search.php
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Search Component Search Model
// Get the pagination request variables
$this->setState('limit', $app->getUserStateFromRequest('com_search.limit', 'limit', $config->get('list_limit'), 'uint'));
$this->setState('limitstart', $app->input->get('limitstart', 0, 'uint'));
// Set the search parameters
$keyword =
urldecode($app->input->getString('searchword'));
$match =
$app->input->get('searchphrase', 'all', 'word');
$ordering =
$app->input->get('ordering', 'newest', 'word');
$this->setSearch($keyword, $match, $ordering);
$areas =
$app->input->get('areas', null, 'array');
* Method to set the search parameters
* @param string search string
* @param string mathcing option, exact|any|all
* @param string ordering option, newest|oldest|popular|alpha|category
public function setSearch($keyword, $match =
'all', $ordering =
'newest')
$this->setState('origkeyword', $keyword);
* Method to set the search areas
* @param array Active areas
* @param array Search areas
public function setAreas($active =
array(), $search =
array())
$this->_areas['active'] =
$active;
$this->_areas['search'] =
$search;
* Method to get weblink item data for the category
// Lets load the content if it doesn't already exist
$results =
$dispatcher->trigger('onContentSearch', array(
foreach ($results as $result)
* Method to get the total number of weblink items for the category
* Method to get a pagination object of the weblink items for the category
// Lets load the content if it doesn't already exist
* Method to get the search areas
// Load the Category data
if (empty($this->_areas['search']))
$searchareas =
$dispatcher->trigger('onContentSearchAreas');
foreach ($searchareas as $area)
$this->_areas['search'] =
$areas;
Documentation generated on Tue, 19 Nov 2013 15:12:39 +0100 by phpDocumentor 1.4.3