Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Kvberlin\FusionCharts;
- use Kvberlin\FusionCharts\Charts\Chart;
- use Zend\Debug\Debug;
- use Zend\View\Model\ViewModel;
- /**
- * ZendFramework3 FusionView
- * Autor: Peter Wendel (ITA),- 897
- * Datum: 07.12.2017
- *
- * Kurzbeschreibung:
- * View zur Anzeige eines Charts
- *
- * @license http://framework.zend.com/license/new-bsd New BSD License
- * Created by PhpStorm.
- */
- class FusionView extends ViewModel
- {
- /**
- * @var Chart
- */
- private $chart;
- public function __construct(string $chartType,array $data)
- {
- parent::__construct();
- $this->chart = new Chart($chartType,$data);
- $this->setTemplate('/fusion/chartview');
- $this->setVariable('chart',$this->chart);
- $this->setFooter(true);
- }
- public function getChart(){
- return $this->chart;
- }
- public function setParams(array $params){
- $this->setVariable('params', $params);
- }
- public function setFooter(bool $footer,string $footer_content='default'){
- $this->setVariables(['footer' => $footer, 'footer_content' => $footer_content]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement