class FederatedTermsProperty in Search API Federated Solr 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/search_api/processor/Property/FederatedTermsProperty.php \Drupal\search_api_federated_solr\Plugin\search_api\processor\Property\FederatedTermsProperty
- 8 src/Plugin/search_api/processor/Property/FederatedTermsProperty.php \Drupal\search_api_federated_solr\Plugin\search_api\processor\Property\FederatedTermsProperty
- 8.2 src/Plugin/search_api/processor/Property/FederatedTermsProperty.php \Drupal\search_api_federated_solr\Plugin\search_api\processor\Property\FederatedTermsProperty
Defines an "federated terms" property.
Hierarchy
- class \Drupal\search_api_federated_solr\Plugin\search_api\processor\Property\FederatedTermsProperty extends \Drupal\search_api\Processor\ConfigurablePropertyBase uses StringTranslationTrait
Expanded class hierarchy of FederatedTermsProperty
See also
\Drupal\search_api_federated_solr\Plugin\search_api\processor\FederatedTerms
1 file declares its use of FederatedTermsProperty
- FederatedTerms.php in src/
Plugin/ search_api/ processor/ FederatedTerms.php
File
- src/
Plugin/ search_api/ processor/ Property/ FederatedTermsProperty.php, line 15
Namespace
Drupal\search_api_federated_solr\Plugin\search_api\processor\PropertyView source
class FederatedTermsProperty extends ConfigurablePropertyBase {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'type' => 'union',
'fields' => [],
];
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(FieldInterface $field, array $form, FormStateInterface $form_state) {
$form['#attached']['library'][] = 'search_api/drupal.search_api.admin_css';
$form['#tree'] = TRUE;
$form['field_data'] = [
'#type' => 'item',
'#title' => $this
->t('Federated terms'),
'#description' => $this
->t('By adding this field to your search index configuration, you have enabled the federated terms processor to run when new items are indexed. Next, add a "Federated Terms" field to any taxonomy vocabulary whose terms should be mapped to a "federated" term (this helps map terms across vocabularies and sites to a single "federated" term). Then, edit terms in those vocabularies to add the federated term destination value (i.e. "Conditions>Blood Disorders"). Once that tagged content gets indexed, it will have "federated_terms" populated with any matching federated term destination values.'),
];
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FederatedTermsProperty:: |
public | function | ||
FederatedTermsProperty:: |
public | function | ||
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |