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

ShiftController Employee Shift Scheduling, version 4.9.85. 32 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.85/code/sh4/new/controller/common.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.85/raw/sh4/new/controller/common.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.85/code/sh4/new/controller/common.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
#[AllowDynamicProperties]
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 )
	{
	}
}

```
