# shiftcontroller/4.9.66/sh4/employees/model.php

ShiftController Employee Shift Scheduling, version 4.9.66. 52 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/code/sh4/employees/model.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/raw/sh4/employees/model.php
- Modified: 2023-05-29T12:46:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shiftcontroller/4.9.66/code/sh4/employees/model.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class SH4_Employees_Model
{
	const STATUS_ACTIVE = 'publish';
	const STATUS_ARCHIVE = 'trash';

	private $id = null;
	private $title = '';
	private $description = '';
	private $status = self::STATUS_ACTIVE;
	private $sortOrder = 1;

	public function __construct( $id, $title, $description = '', $status = self::STATUS_ACTIVE, $sortOrder = 1 )
	{
		$this->id = $id;
		$this->title = $title;
		$this->description = $description;
		$this->status = $status;
		$this->sortOrder = $sortOrder;
	}

	public function getId()
	{
		return $this->id;
	}

	public function getTitle()
	{
		return $this->title;
	}

	public function getDescription()
	{
		$ret = ( null === $this->description ) ? '' : $this->description;
		return $ret;
	}

	public function isActive()
	{
		return ($this->status == self::STATUS_ACTIVE);
	}

	public function isArchived()
	{
		return ($this->status == self::STATUS_ARCHIVE);
	}

	public function getSortOrder()
	{
		return $this->sortOrder;
	}
}
```
