Skip to content

Commit

Permalink
Add publicDatatypeValues return in Datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeCo committed May 10, 2019
1 parent f3c1cdc commit 0e8fdf6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Linkdata/Entity/Datatype.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,17 @@ public static function computeHrPercentageMax($rawValue)

return new RelatedValue((($hrValue - $userHrRest) / ($userHrMax - $userHrRest)) * 100, self::HR_PERCENTAGE_MAX);
}

public static function getPublicValuesByDatatype($values)
{
$publicValues = [];

foreach (self::$publicDatatypes as $datatypeId) {
if (isset($values[$datatypeId])) {
$publicValues[$datatypeId] = $values[$datatypeId];
}
}

return $publicValues;
}
}

0 comments on commit 0e8fdf6

Please sign in to comment.