protected ViewsEntitySchemaSubscriber::processHandlers(array $all_views, callable $process)
Applies a callable onto all handlers of all passed in views.
Parameters
\Drupal\views\Entity\View[] $all_views: All views entities.
callable $process: A callable which retrieves a handler config array.
File
- core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php, line 225
Class
- ViewsEntitySchemaSubscriber
- Reacts to changes on entity types to update all views entities.
Namespace
Drupal\views\EventSubscriber
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | protected function processHandlers( array $all_views , callable $process ) { foreach ( $all_views as $view ) { foreach ( array_keys ( $view ->get( 'display' )) as $display_id ) { $display = & $view ->getDisplay( $display_id ); foreach (Views::getHandlerTypes() as $handler_type ) { $handler_type = $handler_type [ 'plural' ]; if (!isset( $display [ 'display_options' ][ $handler_type ])) { continue ; } foreach ( $display [ 'display_options' ][ $handler_type ] as $id => & $handler_config ) { $process ( $handler_config ); if ( $handler_config === NULL) { unset( $display [ 'display_options' ][ $handler_type ][ $id ]); } } } } } } |
Please login to continue.