public function Glossary::checkFieldName in Search API AZ Glossary 8.4
Same name and namespace in other branches
- 8.3 src/Plugin/search_api/processor/Glossary.php \Drupal\search_api_glossary\Plugin\search_api\processor\Glossary::checkFieldName()
Check for Glossary field.
Check if the supplied name matches the prefix This is used to determine if a given field is a glossary field or not.
Parameters
string $name: Name of the field to check.
Return value
bool Is the supplied field glossary or not?
2 calls to Glossary::checkFieldName()
- Glossary::addFieldValues in src/
Plugin/ search_api/ processor/ Glossary.php - Adds the values of properties defined by this processor to the item.
- Glossary::buildConfigurationForm in src/
Plugin/ search_api/ processor/ Glossary.php - Form constructor.
File
- src/
Plugin/ search_api/ processor/ Glossary.php, line 292
Class
- Glossary
- Adds the item's AZ to the indexed data.
Namespace
Drupal\search_api_glossary\Plugin\search_api\processorCode
public function checkFieldName($name) {
if (substr($name, 0, strlen($this->targetFieldPrefix)) === $this->targetFieldPrefix) {
return TRUE;
}
return FALSE;
}