Skip to content

Instantly share code, notes, and snippets.

@mass6
Created March 29, 2014 12:12
Show Gist options
  • Save mass6/9853401 to your computer and use it in GitHub Desktop.
Save mass6/9853401 to your computer and use it in GitHub Desktop.
To become Factory
if(file_exists('protected/components/' . $this->reportName . '.php')){
$reportModel = new $this->reportName;
$this->reportTitle = $reportModel->reportTitle;
$this->_report = $reportModel->getReport();
$this->reportContent = $this->_report->report;
$this->downloadableReport = $this->_report->reportGrid;
} else {
$this->reportContent = 'No report of named type ' . $this->reportName ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment