# shiftcontroller/4.9.66/hc3/users/presenter.php

ShiftController Employee Shift Scheduling, version 4.9.66. 45 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/code/hc3/users/presenter.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.66/raw/hc3/users/presenter.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/hc3/users/presenter.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
interface HC3_Users_IPresenter
{
	public function presentTitle( HC3_Users_Model $user );
}

class HC3_Users_Presenter implements HC3_Users_IPresenter
{
	public $ui;

	public function __construct( HC3_Ui $ui )
	{
		$this->ui = $ui;
	}

	public function presentTitleList( HC3_Users_Model $user )
	{
		$username = $user->getUsername();
		$displayName = $user->getDisplayName();
		$email = $user->getEmail();

		$return[] = $this->ui->makeSpan( $username )->tag('font-style', 'bold');
		$return[] = $this->ui->makeSpan( $displayName )->tag('font-size', 2);
		if( $email != $username ){
			$return[] = $this->ui->makeSpan( $email )->tag('font-size', 2);
		}
		$return = $this->ui->makeList( $return )->gutter(0);

		return $return;
	}

	public function presentTitle( HC3_Users_Model $user )
	{
		$username = $user->getUsername();
		$displayName = $user->getDisplayName();
		$email = $user->getEmail();

		$return[] = $this->ui->makeSpan( $username )->tag('font-style', 'bold');
		$return[] = '(' . $displayName . ')';

		$return = $this->ui->makeListInline( $return )->gutter(1);
		return $return;
	}

}
```
