| 123456789101112131415161718192021222324252627282930313233343536373839404142 | 
							- <?php
 
- /*
 
-  @nom: Widget
 
-  @auteur: Valentin CARRUESCO (valentin.carruesco@sys1.fr)
 
-  @description:  Classe de gestion des widget créés
 
-  */
 
- class Widget extends SQLiteEntity{
 
- 	public $id,$minified,$column,$cell,$model,$data,$dashboard;
 
- 	protected $TABLE_NAME = 'plugin_dashboard';
 
- 	protected $CLASS_NAME = 'Widget';
 
- 	protected $object_fields = 
 
- 	array(
 
- 		'id'=>'key',
 
- 		'model'=>'longstring',
 
- 		'data'=>'longstring',
 
- 		'cell'=>'int',
 
- 		'column'=>'int',
 
- 		'minified' => 'int',
 
- 		'dashboard' => 'int'
 
- 	);
 
- 	function __construct(){
 
- 		parent::__construct();
 
- 		$this->dashboard = 0;
 
- 	}
 
- 	public function data($data=null){
 
- 		if(empty($data)){
 
- 			$array = json_decode($this->data,true);
 
- 			return is_array($array)?$array:array();
 
- 		}else{
 
- 			$this->data = json_encode($data);
 
- 		}
 
- 	}
 
- }
 
- ?>
 
 
  |