/
header.php
56 lines (47 loc) · 1.13 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Concrete\Controller\Element\Search\Users;
use Concrete\Core\Controller\ElementController;
use Concrete\Core\Entity\Search\Query;
use Core;
class Header extends ElementController
{
protected $query;
protected $showAddButton = false;
/**
* @return bool
*/
public function isShowAddButton()
{
return $this->showAddButton;
}
/**
* @param bool $showAddButton
*/
public function setShowAddButton($showAddButton)
{
$this->showAddButton = $showAddButton;
}
public function __construct(Query $query = null)
{
$this->query = $query;
parent::__construct();
}
public function getElement()
{
return 'users/search_header';
}
public function view()
{
$this->set('canExportUsers', $this->canExportUsers());
$this->set('showAddButton', $this->showAddButton);
$this->set('query', $this->query);
}
/**
* @return bool
*/
private function canExportUsers()
{
$dh = Core::make('helper/concrete/user');
return $dh->canAccessUserSearchInterface();
}
}