# shiftcontroller/4.9.24/sh4/new/controller/common.php

ShiftController Employee Shift Scheduling, version 4.9.24. 31 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.24/code/sh4/new/controller/common.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.24/raw/sh4/new/controller/common.php
- Modified: 2021-08-06T12:33:10+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.24/code/sh4/new/controller/common.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class SH4_New_Controller_Common
{
	public function __construct(
		HC3_Hooks $hooks,
		HC3_Post $post,
		HC3_Notificator $notificator
		)
	{
		$this->self = $hooks->wrap( $this );

		$this->post = $hooks->wrap( $post );
		$this->notificator = $notificator;
	}

	public function beforeExecute()
	{
		$isOff = $this->post->get('notifications_turnoff');
		if( $isOff ){
			$this->notificator->setOff();
		}
		else {
			$this->notificator->setOn();
		}
	}

	public function afterExecute( $ids )
	{
	}
}

```
