# shiftcontroller/4.9.66/sh4/notifications/html/admin/controller/disable.php

ShiftController Employee Shift Scheduling, version 4.9.66. 26 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/code/sh4/notifications/html/admin/controller/disable.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/raw/sh4/notifications/html/admin/controller/disable.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/notifications/html/admin/controller/disable.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
#[AllowDynamicProperties]
class SH4_Notifications_Html_Admin_Controller_Disable
{
	public function __construct(
		HC3_Hooks $hooks,
		HC3_Post $post,

		SH4_Calendars_Query $calendarsQuery,
		SH4_Notifications_Service $notificationsService
		)
	{
		$this->calendarsQuery = $hooks->wrap( $calendarsQuery );
		$this->notificationsService = $hooks->wrap( $notificationsService );
	}

	public function execute( $calendarId, $notificationId )
	{
		$calendar = $this->calendarsQuery->findById( $calendarId );
		$this->notificationsService->setOff( $calendar, $notificationId );

		$to = '-referrer-';
		$return = array( $to, '__Notification Disabled__' );
		return $return;
	}
}
```
