You are here

public function UserStatistics::nodeCount in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
  2. 8.8 modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
  3. 10.3.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
  4. 10.1.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
  5. 10.2.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()

Get node count by type.

Parameters

int $user_id: The user ID.

string $type: Node type id.

Return value

int The number of nodes.

File

modules/social_features/social_profile/src/UserStatistics.php, line 42

Class

UserStatistics
Class UserStatistics.

Namespace

Drupal\social_profile

Code

public function nodeCount($user_id, $type) {
  return $this
    ->count($user_id, $type);
}