public function UserStatistics::nodeCount in Open Social 8.9
Same name and namespace in other branches
- 8.8 modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
- 10.3.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
- 10.0.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
- 10.1.x modules/social_features/social_profile/src/UserStatistics.php \Drupal\social_profile\UserStatistics::nodeCount()
- 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_profileCode
public function nodeCount($user_id, $type) {
return $this
->count($user_id, $type);
}