PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / sh4 / employees / model.php

model.php in ShiftController Employee Shift Scheduling 4.9.66, at sh4/employees/model.php

52 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 class SH4_Employees_Model
3 {
4 const STATUS_ACTIVE = 'publish';
5 const STATUS_ARCHIVE = 'trash';
6
7 private $id = null;
8 private $title = '';
9 private $description = '';
10 private $status = self::STATUS_ACTIVE;
11 private $sortOrder = 1;
12
13 public function __construct( $id, $title, $description = '', $status = self::STATUS_ACTIVE, $sortOrder = 1 )
14 {
15 $this->id = $id;
16 $this->title = $title;
17 $this->description = $description;
18 $this->status = $status;
19 $this->sortOrder = $sortOrder;
20 }
21
22 public function getId()
23 {
24 return $this->id;
25 }
26
27 public function getTitle()
28 {
29 return $this->title;
30 }
31
32 public function getDescription()
33 {
34 $ret = ( null === $this->description ) ? '' : $this->description;
35 return $ret;
36 }
37
38 public function isActive()
39 {
40 return ($this->status == self::STATUS_ACTIVE);
41 }
42
43 public function isArchived()
44 {
45 return ($this->status == self::STATUS_ARCHIVE);
46 }
47
48 public function getSortOrder()
49 {
50 return $this->sortOrder;
51 }
52 }