DisplayPluginCollection example


  public function initDisplay() {
    if (isset($this->current_display)) {
      return TRUE;
    }

    // Initialize the display cache array.     $this->displayHandlers = new DisplayPluginCollection($this, Views::pluginManager('display'));

    $this->current_display = 'default';
    $this->display_handler = $this->displayHandlers->get('default');

    return TRUE;
  }

  /** * Gets the first display that is accessible to the user. * * @param array|string $displays * Either a single display id or an array of display ids. * * @return string * The first accessible display id, at least default. */
Home | Imprint | This part of the site doesn't use cookies.