public function RemoveNonPublicFiles::onFilterFields in Acquia Content Hub 8.2
Filter fields.
Parameters
\Drupal\depcalc\Event\FilterDependencyCalculationFieldsEvent $event: Filter Dependency Calculation Fields.
File
- src/
EventSubscriber/ FilterDeps/ RemoveNonPublicFiles.php, line 60
Class
- RemoveNonPublicFiles
- Class RemoveNonPublicFiles.
Namespace
Drupal\acquia_contenthub\EventSubscriber\FilterDepsCode
public function onFilterFields(FilterDependencyCalculationFieldsEvent $event) {
$fields = array_filter($event
->getFields(), function ($field) {
return $this
->includeField($field);
}, ARRAY_FILTER_USE_BOTH);
$event
->setFields(...$fields);
}