Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / modules / rdf / src / SchemaOrgDataConverter.php
1 <?php
2
3 namespace Drupal\rdf;
4
5 class SchemaOrgDataConverter {
6
7   /**
8    * Converts an interaction count to a string with the interaction type.
9    *
10    * Schema.org defines a number of different interaction types.
11    *
12    * @param int $count
13    *   The interaction count.
14    * @param array $arguments
15    *   An array of arguments defined in the mapping.
16    *   Expected keys are:
17    *     - interaction_type: The string to use for the type of interaction
18    *       (e.g. UserComments).
19    *
20    * @return string
21    *   The formatted string.
22    *
23    * @see http://schema.org/UserInteraction
24    */
25   public static function interactionCount($count, $arguments) {
26     $interaction_type = $arguments['interaction_type'];
27     return "$interaction_type:$count";
28   }
29
30 }