Skip to main content
Memo : drupal views

The views module is a very useful module for running a Drupal site. It basically allows you to sort content.

 

Initializing a view:

use Drupal\views\Views;


$view_name="id_vue";// valeur à remplacer
$view_display="page_1";// valeur à remplacer
Views::getView($view_name);
$view->setDisplay($view_display);
// Execute view query.
$view->initHandlers();

The Drupal\views\ViewExecutable::build method allows you to build all queries.

 

Plugins : @ViewsFilter


These plugins allow you to filter the SQL query via the query() method.

Profile picture for user admin Stephane K

Écrit le

Il y'a 1 year
Modifié
Il y'a 2 weeks
Loading ...
WhatsApp
Support Habeuk : +237 694 900 622
WhatsApp Send