You are here

protected function FieldsProcessorPluginBase::shouldProcess in Search API 8

Determines whether a single value (not an array) should be processed.

The default implementation returns TRUE if and only if the value is a string.

Parameters

mixed $value: The value. For instance, a field or condition value.

Return value

bool TRUE if process() should be called on the given value, FALSE otherwise.

See also

\Drupal\search_api\Processor\FieldsProcessorPluginBase::process()

4 calls to FieldsProcessorPluginBase::shouldProcess()
FieldsProcessorPluginBase::processConditionValue in src/Processor/FieldsProcessorPluginBase.php
Processes a single condition value.
FieldsProcessorPluginBase::processFieldValue in src/Processor/FieldsProcessorPluginBase.php
Processes a single text element in a field.
FieldsProcessorPluginBase::processKey in src/Processor/FieldsProcessorPluginBase.php
Processes a single search keyword.
TestFieldsProcessorPlugin::shouldProcess in tests/src/Unit/Processor/TestFieldsProcessorPlugin.php
Determines whether a single value (not an array) should be processed.
1 method overrides FieldsProcessorPluginBase::shouldProcess()
TestFieldsProcessorPlugin::shouldProcess in tests/src/Unit/Processor/TestFieldsProcessorPlugin.php
Determines whether a single value (not an array) should be processed.

File

src/Processor/FieldsProcessorPluginBase.php, line 577

Class

FieldsProcessorPluginBase
Provides a base class for processors that work on individual fields.

Namespace

Drupal\search_api\Processor

Code

protected function shouldProcess($value) : bool {
  return is_string($value);
}