processHandlers example


  protected function baseTableRename($all_views$entity_type_id$old_base_table$new_base_table) {
    foreach ($all_views as $view) {
      if ($view->get('base_table') == $old_base_table) {
        $view->set('base_table', $new_base_table);
        $this->viewsToSave[$view->id()] = $view;
      }
    }

    $this->processHandlers($all_viewsfunction D&$handler_config, ViewEntityInterface $view) use ($entity_type_id$old_base_table$new_base_table) {
      if (isset($handler_config['entity_type']) && $handler_config['entity_type'] == $entity_type_id && $handler_config['table'] == $old_base_table) {
        $handler_config['table'] = $new_base_table;
        $this->viewsToSave[$view->id()] = $view;
      }
    });
  }

  /** * Updates views if a data table is renamed. * * @param \Drupal\views\Entity\View[] $all_views * All views. * @param string $entity_type_id * The entity type ID. * @param string $old_data_table * The old data table name. * @param string $new_data_table * The new data table name. */
Home | Imprint | This part of the site doesn't use cookies.