public function UserAnalyticsTopicsCreated::getValue in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 8.3 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 8.5 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 8.6 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 8.7 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 8.8 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 10.3.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 10.0.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 10.1.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
- 10.2.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserAnalyticsTopicsCreated.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserAnalyticsTopicsCreated::getValue()
Returns the value.
Parameters
\Drupal\user\UserInterface $entity: The User entity to get the value from.
Return value
string The value.
Overrides UserExportPluginBase::getValue
File
- modules/
social_features/ social_user_export/ src/ Plugin/ UserExportPlugin/ UserAnalyticsTopicsCreated.php, line 29
Class
- UserAnalyticsTopicsCreated
- Provides a 'UserAnalyticsTopicsCreated' user export row.
Namespace
Drupal\social_user_export\Plugin\UserExportPluginCode
public function getValue(UserInterface $entity) {
$query = $this->database
->select('node', 'n');
$query
->join('node_field_data', 'nfd', 'nfd.nid = n.nid');
$query
->condition('nfd.uid', $entity
->id())
->condition('nfd.type', 'topic');
return (int) $query
->countQuery()
->execute()
->fetchField();
}