You are here

public function ContentReportServiceInterface::getModalLink 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::getModalLink()
  2. 8.5 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  3. 8.6 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  4. 8.7 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  5. 8.8 modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  6. 10.0.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  7. 10.1.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()
  8. 10.2.x modules/social_features/social_content_report/src/ContentReportServiceInterface.php \Drupal\social_content_report\ContentReportServiceInterface::getModalLink()

Returns a modal link to the reporting form to use in a #links array.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to create the report for.

string $flag_id: The flag ID.

bool $is_button: TRUE if need to show it like button.

Return value

array|null A renderable array to be used in a #links array or FALSE if the user has no access.

1 method overrides ContentReportServiceInterface::getModalLink()
ContentReportService::getModalLink in modules/social_features/social_content_report/src/ContentReportService.php

File

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

Class

ContentReportServiceInterface
Interface ContentReportServiceInterface.

Namespace

Drupal\social_content_report

Code

public function getModalLink(EntityInterface $entity, $flag_id, $is_button = FALSE) : ?array;