Commit 55e559e6 authored by catch's avatar catch
Browse files

Issue #3261245 by andypost, andregp, paulocs, longwave, catch, daffie,...

Issue #3261245 by andypost, andregp, paulocs, longwave, catch, daffie, quietone: Remove deprecated views module functions
parent 6bfe646d
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -78,14 +78,6 @@ views.field.node_bulk_form:
  type: views_field_bulk_form
  label: 'Node bulk form'

views.field.node_path:
  type: views_field
  label: 'Node path'
  mapping:
    absolute:
      type: boolean
      label: 'Use absolute link (begins with "http://")'

views.field.node_revision_link:
  type: views_field
  label: 'Link to a node revision'
+3 −2
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ display:
        path:
          id: path
          table: node
          field: path
          field: view_node
          relationship: none
          group_type: group
          admin_label: ''
@@ -117,9 +117,10 @@ display:
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          output_url_as_text: true
          absolute: false
          entity_type: node
          plugin_id: node_path
          plugin_id: entity_link
      filters:
        status:
          value: '1'
+0 −20
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
use Drupal\Core\Cache\Cache;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\HttpFoundation\Request;

/**
 * Simple caching of query results for Views displays.
@@ -47,29 +46,10 @@ class Time extends CachePluginBase {
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter) {
    $this->dateFormatter = $date_formatter;
    if (func_num_args() == 5 && func_get_arg(4) instanceof Request) {
      @trigger_error('The request object must not be passed to ' . __METHOD__ . '(). It is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3154016', E_USER_DEPRECATED);
    }

    parent::__construct($configuration, $plugin_id, $plugin_definition);
  }

  /**
   * Returns replacements for deprecated properties.
   *
   * @param string $name
   *   The property name.
   *
   * @return mixed
   *   The value.
   */
  public function __get($name) {
    if ($name === 'request') {
      @trigger_error('The request property of ' . __CLASS__ . ' is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3154016', E_USER_DEPRECATED);
      return $this->view->getRequest();
    }
  }

  /**
   * {@inheritdoc}
   */
+1 −5
Original line number Diff line number Diff line
@@ -75,13 +75,9 @@ class Page extends PathPluginBase {
   * @param \Drupal\Core\Menu\MenuParentFormSelectorInterface $parent_form_selector
   *   The parent form selector service.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, EntityStorageInterface $menu_storage, MenuParentFormSelectorInterface $parent_form_selector = NULL) {
  public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, EntityStorageInterface $menu_storage, MenuParentFormSelectorInterface $parent_form_selector) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $state);
    $this->menuStorage = $menu_storage;
    if (!$parent_form_selector) {
      @trigger_error('Calling ' . __METHOD__ . '() without the $parent_form_selector argument is deprecated in drupal:9.3.0 and the $parent_form_selector argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3027559', E_USER_DEPRECATED);
      $parent_form_selector = \Drupal::service('menu.parent_form_selector');
    }
    $this->parentFormSelector = $parent_form_selector;
  }

+0 −19
Original line number Diff line number Diff line
@@ -378,25 +378,6 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) {
    }
  }

  /**
   * Provide a form in the views wizard if this style is selected.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   * @param string $type
   *   The display type, either block or page.
   *
   * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct
   *   replacement is provided.
   *
   * @see https://www.drupal.org/node/3186502
   */
  public function wizardForm(&$form, FormStateInterface $form_state, $type) {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3186502', E_USER_DEPRECATED);
  }

  /**
   * Alter the options of a display before they are added to the view.
   *
Loading