public function SearchApiAttachmentsReferencesAlterSettings::propertyInfo in Search API attachments 7
Adds attachments property.
Return value
array containing the property.
Overrides SearchApiAttachmentsAlterSettings::propertyInfo
File
- contrib/
search_api_attachments_references/ includes/ callback_attachments_references_settings.inc, line 76 - Search API data alteration callback.
Class
Code
public function propertyInfo() {
$ret = array();
if ($this->index
->getEntityType() == 'file') {
$ret['attachments_content'] = array(
'label' => 'File content',
'description' => 'File content',
'type' => 'text',
);
}
else {
$fields = $this
->getFileFields();
foreach ($fields as $name => $field) {
$ret['attachments_' . $name] = array(
'label' => 'Attachment content: ' . $name,
'description' => $name,
'type' => 'text',
);
}
}
return $ret;
}