Bỏ qua nội dung chính

UITCODE - Share to be shared

Site Builder
Theme Development
Module Development
Xóa nhiều user trong Drupal

Xóa nhiều user trong Drupal

Đầu tiên chúng ta cần nid của các node cần xóa.

Để lấy nid của các node cần xóa chúng ta co thể dùng entityQuery như sau:

$content_type = 'content_type_name';
$nids = \Drupal::entityQuery('node')
  ->condition('type', $content_type)
  ->execute();

Mr. Hoang ThienÍt hơn 1 phútDrupalDrupal 8Drupal 9Drupal moduleModule DevelopmentDrupalCode
Xóa nhiều node trong Drupal

Xóa nhiều node trong Drupal

Đầu tiên chúng ta cần nid của các node cần xóa.

Để lấy nid của các node cần xóa chúng ta co thể dùng entityQuery như sau:

$content_type = 'content_type_name';
$nids = \Drupal::entityQuery('node')
  ->condition('type', $content_type)
  ->execute();

Mr. Hoang ThienÍt hơn 1 phútDrupalDrupal 8Drupal 9Drupal moduleModule DevelopmentDrupalCode