protected function ActivityFactory::getFieldOutputText in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.2 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.3 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.4 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.5 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.6 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 8.7 modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 10.3.x modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 10.0.x modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 10.1.x modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
- 10.2.x modules/custom/activity_creator/src/ActivityFactory.php \Drupal\activity_creator\ActivityFactory::getFieldOutputText()
Get field value for 'output_text' field from data array.
2 calls to ActivityFactory::getFieldOutputText()
- ActivityFactory::buildActivities in modules/
custom/ activity_creator/ src/ ActivityFactory.php - Build the activities based on a data array.
- ActivityFactory::buildAggregatedActivites in modules/
custom/ activity_creator/ src/ ActivityFactory.php - Build the aggregated activities based on a data array.
File
- modules/
custom/ activity_creator/ src/ ActivityFactory.php, line 140
Class
- ActivityFactory
- Class ActivityFactory to create Activity items based on ActivityLogs.
Namespace
Drupal\activity_creatorCode
protected function getFieldOutputText(Message $message, $arguments = []) {
$value = NULL;
if (isset($message)) {
$value = $this
->getMessageText($message);
// Text for aggregated activities.
if (!empty($value[1]) && !empty($arguments)) {
$text = str_replace('@count', $arguments['@count'], $value[1]);
}
else {
$text = $value[0];
}
// Add format.
$value = [
'0' => [
'value' => $text,
'format' => 'basic_html',
],
];
}
return $value;
}