_postExecute example

if ($cache->cacheGet('results')) {
      if ($this->usePager()) {
        $this->pager->total_items = $this->total_rows;
        $this->pager->updatePageInfo();
      }
    }
    else {
      $this->query->execute($this);
      // Enforce the array key rule as documented in       // views_plugin_query::execute().       $this->result = array_values($this->result);
      $this->_postExecute();
      $cache->cacheSet('results');
    }

    // Let modules modify the view just after executing it.     $module_handler->invokeAll('views_post_execute', [$this]);

    return $this->executed = TRUE;
  }

  /** * Renders this view for a certain display. * * Note: You should better use just the preview function if you want to * render a view. * * @param string $display_id * The machine name of the display, which should be rendered. * * @return array|null * A renderable array containing the view output or NULL if the build * process failed. */
Home | Imprint | This part of the site doesn't use cookies.