| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Application |
JSearchHelper |
inArea |
inArea() |
Never | Work in Progress |
Determines whether or not the the specified areas intersect with the areas that the search plugin handles.
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. |
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.