You are here

interface ContentReportServiceInterface in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  2. 8.5 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  3. 8.6 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  4. 8.7 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  5. 8.8 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  6. 10.0.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  7. 10.1.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface
  8. 10.2.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface

Interface ContentReportServiceInterface.

@package Drupal\social_content_report

Hierarchy

Expanded class hierarchy of ContentReportServiceInterface

All classes that implement ContentReportServiceInterface

2 files declare their use of ContentReportServiceInterface
FlagAccessCheck.php in modules/social_features/social_content_report/src/Access/FlagAccessCheck.php
FlagSubscriber.php in modules/social_features/social_content_report/src/EventSubscriber/FlagSubscriber.php

File

modules/social_features/social_content_report/src/ContentReportServiceInterface.php, line 12

Namespace

Drupal\social_content_report
View source
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;

}

Members

Namesort descending Modifiers Type Description Overrides
ContentReportServiceInterface::getModalLink public function Returns a modal link to the reporting form to use in a #links array. 1
ContentReportServiceInterface::getReportFlagTypes public function Gets all the 'report_' flag types. 1