Passed
Pull Request — developer (#16066)
by Arkadiusz
30:37 queued 13:08
created

YetiForceDetail::getPageTitle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
/**
3
 * YetiForce detail view file.
4
 *
5
 * @package   Controller
6
 *
7
 * @copyright YetiForce S.A.
8
 * @license   YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
9
 * @author    Arkadiusz Sołek <[email protected]>
10
 */
11
12
namespace App\Controller\Components\View;
13
14
/**
15
 * YetiForce detail view class.
16
 */
17
class YetiForceDetail extends \App\Controller\Modal
18
{
19
	/** {@inheritdoc} */
20
	public $successBtn = '';
21
	/** {@inheritdoc} */
22
	public $dangerBtn = 'LBL_CLOSE';
23
	/** {@inheritdoc} */
24
	public $modalSize = 'modal-xl';
25
26
	/** {@inheritdoc} */
27
	public function checkPermission(\App\Request $request)
28
	{
29
		return true;
30
	}
31
32
	/** {@inheritdoc} */
33
	public function getPageTitle(\App\Request $request)
34
	{
35
		$version = \App\User::getCurrentUserModel()->isAdmin() ? 'v' . \App\Version::get() : '';
36
		return 'YetiForceCRM ' . $version . '- The most flexible CRM in the world';
37
	}
38
39
	/** {@inheritdoc} */
40
	public function process(\App\Request $request)
41
	{
42
		$viewer = $this->getViewer($request);
43
		$viewer->view('YetiForceDetailModal.tpl', $request->getModule());
44
	}
45
}
46