Skip to content

Instantly share code, notes, and snippets.

@destinydriven
Created April 4, 2015 21:24
Show Gist options
  • Save destinydriven/a179f227b2d5a37f9fa7 to your computer and use it in GitHub Desktop.
Save destinydriven/a179f227b2d5a37f9fa7 to your computer and use it in GitHub Desktop.
namespace Highcharts\Controller\Component;
use Cake\Controller\Component;
use Ghunti\HighchartsPHP\Highchart;
use Ghunti\HighchartsPHP\HighchartJsExpr;
class HighchartsComponent extends Component {
public function initialize(array $config) {
parent::initialize($config);
}
public function create($name, $type) {
if (!isset($type)) {
$this->log(sprintf(__('Please provide a type for chart %s!', true), $name));
return false;
}
$chart = new Highchart($type);
debug($chart); die;
return $chart;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment