PlanningEventType.class.php 927 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Définit un type d'evenement planning
  4. * @author Valentin CARRUESCO
  5. * @category Plugin
  6. * @license MIT
  7. */
  8. class PlanningEventType extends Entity{
  9. public $id,$label,$icon,$editable,$parent,$color,$slug,$sort,$state;
  10. protected $TABLE_NAME = 'planning_event_type';
  11. public $fields =
  12. array(
  13. 'id' => 'key',
  14. 'label' => 'string',
  15. 'icon' => 'string',
  16. 'editable' => 'int',
  17. 'parent' => 'int',
  18. 'color' => 'string',
  19. 'state' => 'string',
  20. 'sort' => 'int',
  21. 'slug' => 'string'
  22. );
  23. function __construct(){
  24. parent::__construct();
  25. $this->state = self::ACTIVE;
  26. $this->parent = 0;
  27. }
  28. public static function getAll($columns = array(), $order = null, $limit = null, $selColumn = array('*'), $joins = 0){
  29. $types = PlanningEventType::loadAll($columns,$order,$limit,$selColumn,$joins);
  30. Plugin::callHook('planning_types',array(&$types,$columns,$order,$limit,$selColumn,$joins));
  31. return $types;
  32. }
  33. }
  34. ?>