public function SearchApiAttachmentsAlterSettings::propertyInfo in Search API attachments 7
Adds attachments property.
Return value
array containing the property.
Overrides SearchApiAbstractAlterCallback::propertyInfo
10 methods override SearchApiAttachmentsAlterSettings::propertyInfo()
- SearchApiAttachmentsCommentAlterSettings::propertyInfo in contrib/
search_api_attachments_comment/ includes/ callback_attachments_comment_settings.inc - Adds attachments property.
- SearchApiAttachmentsCommerceProductReferenceAlterSettings::propertyInfo in contrib/
search_api_attachments_commerce_product_reference/ includes/ callback_attachments_commerce_product_reference_settings.inc - Adds attachments property.
- SearchApiAttachmentsEntityreferenceAlterSettings::propertyInfo in contrib/
search_api_attachments_entityreference/ includes/ callback_attachments_entityreference_settings.inc - Adds attachments property.
- SearchApiAttachmentsFieldCollectionsAlterSettings::propertyInfo in contrib/
search_api_attachments_field_collections/ includes/ callback_attachments_field_collections_settings.inc - Adds attachments property.
- SearchApiAttachmentsLinksAlterSettings::propertyInfo in contrib/
search_api_attachments_links/ includes/ callback_attachments_links_settings.inc - Adds attachments property.
File
- includes/
callback_attachments_settings.inc, line 194 - Search API data alteration callback.
Class
- SearchApiAttachmentsAlterSettings
- Indexes files content.
Code
public function propertyInfo() {
$ret = array();
if ($this->index
->getEntityType() == 'file' || $this
->isMultipleIndexWithFile()) {
$ret['attachments_content'] = array(
'label' => 'File content',
'description' => 'File content',
'type' => 'text',
);
}
if ($this->index
->getEntityType() != 'file') {
$fields = $this
->getFileFields();
foreach ($fields as $name => $field) {
$ret['attachments_' . $name] = array(
'label' => 'Attachment content: ' . $name,
'description' => $name,
'type' => 'text',
);
}
}
return $ret;
}