Skip to content

Commit

Permalink
Refs matomo-org#4041, default to HtmlTable if visualization ID is inv…
Browse files Browse the repository at this point in the history
…alid and filled out a function doc.
  • Loading branch information
Benaka Moorthi committed Sep 14, 2013
1 parent 62f5478 commit e36142a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/DataTableVisualization.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ public static function getVisualizationInfoFor($visualizations)
* Returns the visualization class by it's viewDataTable ID.
*
* @param string $id The visualization ID.
* @return string The visualization class name.
* @throws \Exception if $id is not a valid visualization ID.
* @return string The visualization class name. If $id is not a valid ID, the HtmlTable visualization
* is returned.
*/
public static function getClassFromId($id)
{
$visualizationClasses = self::getAvailableVisualizations();
if (!isset($visualizationClasses[$id])) {
throw new \Exception("Invalid DataTable visualization ID: '$id'.");
return $visualizationClasses['table'];
}
return $visualizationClasses[$id];
}
Expand Down
3 changes: 2 additions & 1 deletion core/ViewDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ private function setViewProperty($name, $value)
}

/**
* TODO
* Sets visualization properties using data in a visualization's default property values
* array.
*/
private function setVisualizationPropertiesFromMetadata($properties)
{
Expand Down

0 comments on commit e36142a

Please sign in to comment.