protected function SearchApiAttachmentsAlterSettings::isTemporary in Search API attachments 7
Check if the file is temporary.
Parameters
array $file: A file array.
Return value
bool TRUE if the file is temporary. FALSE otherwise.
4 calls to SearchApiAttachmentsAlterSettings::isTemporary()
- SearchApiAttachmentsAlterSettings::isFileIndexable in includes/
callback_attachments_settings.inc - Checks if file is allowed to be indexed.
- SearchApiAttachmentsCommentAlterSettings::alterItems in contrib/
search_api_attachments_comment/ includes/ callback_attachments_comment_settings.inc - Alter items before indexing.
- SearchApiAttachmentsEntityreferenceAlterSettings::getFilesContent in contrib/
search_api_attachments_entityreference/ includes/ callback_attachments_entityreference_settings.inc - Extracts and returns contents of files.
- SearchApiAttachmentsMultipleEntitiesAlterSettings::alterItems in contrib/
search_api_attachments_multiple_entities/ includes/ callback_attachments_multiple_entities_settings.inc - Alter items before indexing.
File
- includes/
callback_attachments_settings.inc, line 634 - Search API data alteration callback.
Class
- SearchApiAttachmentsAlterSettings
- Indexes files content.
Code
protected function isTemporary(array $file) {
$result = FALSE;
$wrapper = 'temporary://';
$uri = $file['uri'];
if (substr($uri, 0, 12) == $wrapper) {
$result = TRUE;
}
return $result;
}