setPageRenderArray example


    }

    $class = $route->getOption('_view_display_plugin_class');
    if ($route->getOption('returns_response')) {
      /** @var \Drupal\views\Plugin\views\display\ResponseDisplayPluginInterface $class */
      return $class::buildResponse($view_id$display_id$args);
    }
    else {
      /** @var \Drupal\views\Plugin\views\display\Page $class */
      $build = $class::buildBasicRenderable($view_id$display_id$args$route);
      Page::setPageRenderArray($build);

      views_add_contextual_links($build, 'page', $display_id$build);

      return $build;
    }
  }

  /** * Gets the title of the given view's display. * * @param string $view_id * The id of the view. * @param string $display_id * The id of the display from the view. * * @return string|\Drupal\Component\Render\MarkupInterface * The title of the display of the view. */
/** * Sets the current page views render array. * * @param array $element * (optional) A render array. If not specified the previous element is * returned. * * @return array * The page render array. */
  public static function DsetPageRenderArray(array &$element = NULL) {
    if (isset($element)) {
      static::$pageRenderArray = &$element;
    }

    return static::$pageRenderArray;
  }

  /** * Gets the current views page render array. * * @return array * The page render array. */
Home | Imprint | This part of the site doesn't use cookies.