function SchemaOrgDataConverter::interactionCount

Same name in other branches
  1. 9 core/modules/rdf/src/SchemaOrgDataConverter.php \Drupal\rdf\SchemaOrgDataConverter::interactionCount()

Converts an interaction count to a string with the interaction type.

Schema.org defines a number of different interaction types.

Parameters

int $count: The interaction count.

array $arguments: An array of arguments defined in the mapping. Expected keys are:

  • interaction_type: The string to use for the type of interaction (e.g. UserComments).

Return value

string The formatted string.

See also

http://schema.org/UserInteraction

4 string references to 'SchemaOrgDataConverter::interactionCount'
rdf.mapping.node.article.yml in core/profiles/standard/config/install/rdf.mapping.node.article.yml
core/profiles/standard/config/install/rdf.mapping.node.article.yml
rdf.mapping.node.forum.yml in core/modules/forum/config/optional/rdf.mapping.node.forum.yml
core/modules/forum/config/optional/rdf.mapping.node.forum.yml
rdf.mapping.node.page.yml in core/profiles/standard/config/install/rdf.mapping.node.page.yml
core/profiles/standard/config/install/rdf.mapping.node.page.yml
rdf.mapping.node.page.yml in core/modules/node/tests/modules/node_display_configurable_test/config/install/rdf.mapping.node.page.yml
core/modules/node/tests/modules/node_display_configurable_test/config/install/rdf.mapping.node.page.yml

File

core/modules/rdf/src/SchemaOrgDataConverter.php, line 25

Class

SchemaOrgDataConverter

Namespace

Drupal\rdf

Code

public static function interactionCount($count, $arguments) {
    $interaction_type = $arguments['interaction_type'];
    return "{$interaction_type}:{$count}";
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.