social_topic.api.php in Open Social 8
Same filename and directory in other branches
- 8.9 modules/social_features/social_topic/social_topic.api.php
- 8.2 modules/social_features/social_topic/social_topic.api.php
- 8.3 modules/social_features/social_topic/social_topic.api.php
- 8.4 modules/social_features/social_topic/social_topic.api.php
- 8.5 modules/social_features/social_topic/social_topic.api.php
- 8.6 modules/social_features/social_topic/social_topic.api.php
- 8.7 modules/social_features/social_topic/social_topic.api.php
- 8.8 modules/social_features/social_topic/social_topic.api.php
- 10.3.x modules/social_features/social_topic/social_topic.api.php
- 10.0.x modules/social_features/social_topic/social_topic.api.php
- 10.1.x modules/social_features/social_topic/social_topic.api.php
- 10.2.x modules/social_features/social_topic/social_topic.api.php
Hooks provided by the Social_topic module.
File
modules/social_features/social_topic/social_topic.api.phpView source
<?php
/**
* @file
* Hooks provided by the Social_topic module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Provide a method to alter the titles of the topic view.
*
* @param string $title
* The default generated view title for the term.
* @param \Drupal\taxonomy\Entity\Term $term
* The topic type term that is selected in the filter. NULL if none is
* selected.
*
* @ingroup social_topic_api
*/
function hook_topic_type_title_alter(&$title, \Drupal\taxonomy\Entity\Term &$term) {
if (isset($term)) {
$term_title = $term
->getName();
$title = t('@type', [
'@type' => $term_title,
]);
}
else {
$title = t("Newest content");
}
}
/**
* @} End of "addtogroup hooks".
*/
Functions
Name | Description |
---|---|
hook_topic_type_title_alter | Provide a method to alter the titles of the topic view. |