PlanningEventType.class.php 914 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Définit un type d'evenement planning
  4. * @author Valentin CARRUESCO
  5. * @category Plugin
  6. * @license copyright
  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. }
  27. public static function getAll($columns = array(), $order = null, $limit = null, $selColumn = array('*'), $joins = 0){
  28. $types = PlanningEventType::loadAll($columns,$order,$limit,$selColumn,$joins);
  29. Plugin::callHook('planning_types',array(&$types,$columns,$order,$limit,$selColumn,$joins));
  30. return $types;
  31. }
  32. }
  33. ?>