# shiftcontroller/4.9.66/sh4/employees/html/admin/controller/edit.php

ShiftController Employee Shift Scheduling, version 4.9.66. 31 lines.

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

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

		SH4_Employees_Command $command,
		SH4_Employees_Query $query
		)
	{
		$this->post = $hooks->wrap($post);

		$this->command = $hooks->wrap($command);
		$this->query = $hooks->wrap($query);
	}

	public function execute( $id )
	{
		$model = $this->query->findById( $id );

		$title = $this->post->get('title');
		$description = $this->post->get('description');

		$this->command->changeTitle( $model, $title, $description );

		$return = array( 'admin/employees', '__Employee Updated__' );
		return $return;
	}
}
```
