public function PhotosImageSearch::isSearchExecutable in Album Photos 6.0.x
Same name and namespace in other branches
- 8.5 src/Plugin/Search/PhotosImageSearch.php \Drupal\photos\Plugin\Search\PhotosImageSearch::isSearchExecutable()
Verifies if the values set via setSearch() are valid and sufficient.
Return value
bool TRUE if the search settings are valid and sufficient to execute a search, and FALSE if not.
Overrides SearchPluginBase::isSearchExecutable
1 call to PhotosImageSearch::isSearchExecutable()
- PhotosImageSearch::execute in src/
Plugin/ Search/ PhotosImageSearch.php - Executes the search.
File
- src/
Plugin/ Search/ PhotosImageSearch.php, line 225
Class
- PhotosImageSearch
- Handles searching for photos_image entities using the Search module index.
Namespace
Drupal\photos\Plugin\SearchCode
public function isSearchExecutable() {
// PhotosImage search is executable if we have keywords or an advanced
// parameter. At least, we should parse out the parameters and see if there
// are any keyword matches in that case, rather than just printing out the
// "Please enter keywords" message.
return !empty($this->keywords) || isset($this->searchParameters['f']) && count($this->searchParameters['f']);
}