public function ContentReportService::getReportFlagTypes in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 8.5 modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 8.6 modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 8.7 modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 8.8 modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 10.0.x modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 10.1.x modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
- 10.2.x modules/social_features/social_content_report/src/ContentReportService.php \Drupal\social_content_report\ContentReportService::getReportFlagTypes()
Gets all the 'report_' flag types.
This makes it more flexible so when new flags are added, it automatically gets them as well.
Return value
array List of flag type IDs that are used for reporting.
Overrides ContentReportServiceInterface::getReportFlagTypes
File
- modules/
social_features/ social_content_report/ src/ ContentReportService.php, line 77
Class
- ContentReportService
- Provides a content report service.
Namespace
Drupal\social_content_reportCode
public function getReportFlagTypes() : array {
$report_flags = $this->moduleHandler
->invokeAll('social_content_report_flags');
// Allow using reports for three predefined entity types.
$report_flags = array_merge($report_flags, [
'report_comment',
'report_node',
'report_post',
]);
$this->moduleHandler
->alter('social_content_report_flags', $report_flags);
return $report_flags;
}