public function CallbackFieldRow::init in Search Autocomplete 8
Same name and namespace in other branches
- 2.x src/Plugin/views/row/CallbackFieldRow.php \Drupal\search_autocomplete\Plugin\views\row\CallbackFieldRow::init()
Overrides \Drupal\views\Plugin\views\row\RowPluginBase::init().
Overrides PluginBase::init
File
- src/
Plugin/ views/ row/ CallbackFieldRow.php, line 48
Class
- CallbackFieldRow
- Plugin which displays fields as raw data.
Namespace
Drupal\search_autocomplete\Plugin\views\rowCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
if (!empty($this->options['field_options'])) {
$options = (array) $this->options['field_options'];
// Prepare a trimmed version of replacement aliases.
$aliases = static::extractFromOptionsArray('alias', $options);
$this->replacementAliases = array_filter(array_map('trim', $aliases));
// Prepare an array of raw output field options.
$this->rawOutputOptions = static::extractFromOptionsArray('raw_output', $options);
}
}