Skip to content
Extraits de code Groupes Projets
Valider 1ad956d6 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Add public Report::isSubtableReport() method so it can be used in closure on PHP 5.3.

parent eebd6dc7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -601,6 +601,16 @@ class Report ...@@ -601,6 +601,16 @@ class Report
return $subtableReport->getDimension(); return $subtableReport->getDimension();
} }
/**
* Returns true if the report is for another report's subtable, false if otherwise.
*
* @return bool
*/
public function isSubtableReport()
{
return $this->isSubtableReport;
}
/** /**
* Fetches the report represented by this instance. * Fetches the report represented by this instance.
* *
...@@ -722,7 +732,7 @@ class Report ...@@ -722,7 +732,7 @@ class Report
public static function getForDimension(Dimension $dimension) public static function getForDimension(Dimension $dimension)
{ {
return ComponentFactory::getComponentIf(__CLASS__, $dimension->getModule(), function (Report $report) use ($dimension) { return ComponentFactory::getComponentIf(__CLASS__, $dimension->getModule(), function (Report $report) use ($dimension) {
return !$report->isSubtableReport return !$report->isSubtableReport()
&& $report->getDimension() && $report->getDimension()
&& $report->getDimension()->getId() == $dimension->getId(); && $report->getDimension()->getId() == $dimension->getId();
}); });
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter