class SchemaOrgDataConverter

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

Hierarchy

Expanded class hierarchy of SchemaOrgDataConverter

File

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

Namespace

Drupal\rdf
View source
class SchemaOrgDataConverter {
    
    /**
     * Converts an interaction count to a string with the interaction type.
     *
     * Schema.org defines a number of different interaction types.
     *
     * @param int $count
     *   The interaction count.
     * @param 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 string
     *   The formatted string.
     *
     * @see http://schema.org/UserInteraction
     */
    public static function interactionCount($count, $arguments) {
        $interaction_type = $arguments['interaction_type'];
        return "{$interaction_type}:{$count}";
    }

}

Members

Title Sort descending Modifiers Object type Summary
SchemaOrgDataConverter::interactionCount public static function Converts an interaction count to a string with the interaction type.

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