PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / hc3 / users / presenter.php

presenter.php in ShiftController Employee Shift Scheduling 4.9.66, at hc3/users/presenter.php

45 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 interface HC3_Users_IPresenter
3 {
4 public function presentTitle( HC3_Users_Model $user );
5 }
6
7 class HC3_Users_Presenter implements HC3_Users_IPresenter
8 {
9 public $ui;
10
11 public function __construct( HC3_Ui $ui )
12 {
13 $this->ui = $ui;
14 }
15
16 public function presentTitleList( HC3_Users_Model $user )
17 {
18 $username = $user->getUsername();
19 $displayName = $user->getDisplayName();
20 $email = $user->getEmail();
21
22 $return[] = $this->ui->makeSpan( $username )->tag('font-style', 'bold');
23 $return[] = $this->ui->makeSpan( $displayName )->tag('font-size', 2);
24 if( $email != $username ){
25 $return[] = $this->ui->makeSpan( $email )->tag('font-size', 2);
26 }
27 $return = $this->ui->makeList( $return )->gutter(0);
28
29 return $return;
30 }
31
32 public function presentTitle( HC3_Users_Model $user )
33 {
34 $username = $user->getUsername();
35 $displayName = $user->getDisplayName();
36 $email = $user->getEmail();
37
38 $return[] = $this->ui->makeSpan( $username )->tag('font-style', 'bold');
39 $return[] = '(' . $displayName . ')';
40
41 $return = $this->ui->makeListInline( $return )->gutter(1);
42 return $return;
43 }
44
45 }