You are here

protected function LingotekDashboardController::getTargetTypeCount in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8 src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  2. 8.2 src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  3. 4.0.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  4. 3.0.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  5. 3.1.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  6. 3.2.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  7. 3.3.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  8. 3.5.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  9. 3.6.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  10. 3.7.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
  11. 3.8.x src/Controller/LingotekDashboardController.php \Drupal\lingotek\Controller\LingotekDashboardController::getTargetTypeCount()
1 call to LingotekDashboardController::getTargetTypeCount()
LingotekDashboardController::getTargetTypeCounts in src/Controller/LingotekDashboardController.php

File

src/Controller/LingotekDashboardController.php, line 371

Class

LingotekDashboardController
Returns responses for lingotek module setup routes.

Namespace

Drupal\lingotek\Controller

Code

protected function getTargetTypeCount($langcode, $type) {
  $count = $this->entityTypeManager
    ->getStorage($type)
    ->getQuery()
    ->condition('langcode', $langcode)
    ->condition('default_langcode', 0)
    ->count()
    ->execute();
  return (int) $count;
}