ContentReportServiceInterface.php in Open Social 8.6
Same filename and directory in other branches
- 8.9 modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 8.5 modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 8.7 modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 8.8 modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 10.3.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 10.0.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 10.1.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php
- 10.2.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php
Namespace
Drupal\social_content_reportFile
modules/social_features/social_content_report/src/ContentReportServiceInterface.phpView source
<?php
namespace Drupal\social_content_report;
use Drupal\Core\Entity\EntityInterface;
/**
* Interface ContentReportServiceInterface.
*
* @package Drupal\social_content_report
*/
interface ContentReportServiceInterface {
/**
* Gets all the 'report_' flag types.
*
* This makes it more flexible so when new flags are
* added, it automatically gets them as well.
*
* @return array
* List of flag type IDs that are used for reporting.
*/
public function getReportFlagTypes() : array;
/**
* Returns a modal link to the reporting form to use in a #links array.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to create the report for.
* @param string $flag_id
* The flag ID.
* @param bool $is_button
* TRUE if need to show it like button.
*
* @return array|null
* A renderable array to be used in a #links array or FALSE if the user has
* no access.
*/
public function getModalLink(EntityInterface $entity, $flag_id, $is_button = FALSE) : ?array;
}
Interfaces
Name | Description |
---|---|
ContentReportServiceInterface | Interface ContentReportServiceInterface. |