Table of Contents

inArea

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JSearchHelper Method inArea Reference inArea() Never Work in Progress

Determines whether or not the the specified areas intersect with the areas that the search plugin handles.

Syntax

boolean inArea ( $formAreas, $pluginAreas )

$formAreas array is an array of strings specifying search areas from the form.
$pluginAreas array is an associative array of search areas that the plugin handles. The array keys correspond to the areas from the form.

Examples

Example

$areas = array( 'weblinks' => 'Weblinks' );
$formAreas = array( 'content', 'contacts', 'weblinks' );

if (JSearchHelper::inAreas( $formAreas, $areas )) {
	echo 'Search';
} else {
	echo 'Don't Search';
}

will produce:

Result

Search

Normally, the $formAreas array would come from the form.