You are here

protected function FilebrowserUninstallValidator::hasNodes in Filebrowser 3.x

Same name and namespace in other branches
  1. 8.2 src/FilebrowserUninstallValidator.php \Drupal\filebrowser\FilebrowserUninstallValidator::hasNodes()

Determines if there is any filebrowser nodes or not.

Return value

bool TRUE if there are filebrowser nodes, FALSE otherwise.

1 call to FilebrowserUninstallValidator::hasNodes()
FilebrowserUninstallValidator::validate in src/FilebrowserUninstallValidator.php
Determines the reasons a module can not be uninstalled.

File

src/FilebrowserUninstallValidator.php, line 59

Class

FilebrowserUninstallValidator

Namespace

Drupal\filebrowser

Code

protected function hasNodes() {
  $nodes = $this->entityQuery
    ->condition('type', 'dir_listing')
    ->accessCheck(FALSE)
    ->range(0, 1)
    ->execute();
  return !empty($nodes);
}