Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fact/chart/PhabricatorChartDataset.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | final public static function newFromDictionary(array $map) { | ||||
foreach ($map['functions'] as $map) { | foreach ($map['functions'] as $map) { | ||||
$functions[] = PhabricatorChartFunction::newFromDictionary($map); | $functions[] = PhabricatorChartFunction::newFromDictionary($map); | ||||
} | } | ||||
$dataset->setFunctions($functions); | $dataset->setFunctions($functions); | ||||
return $dataset; | return $dataset; | ||||
} | } | ||||
final public function toDictionary() { | |||||
return array( | |||||
'type' => $this->getDatasetTypeKey(), | |||||
'functions' => mpull($this->getFunctions(), 'toDictionary'), | |||||
); | |||||
} | |||||
final public function getChartDisplayData( | final public function getChartDisplayData( | ||||
PhabricatorChartDataQuery $data_query) { | PhabricatorChartDataQuery $data_query) { | ||||
return $this->newChartDisplayData($data_query); | return $this->newChartDisplayData($data_query); | ||||
} | } | ||||
abstract protected function newChartDisplayData( | abstract protected function newChartDisplayData( | ||||
PhabricatorChartDataQuery $data_query); | PhabricatorChartDataQuery $data_query); | ||||
Show All 33 Lines |