BaseControl::getMeetingId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 1
cts 1
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Components;
4
5
use Nette\Application\UI\Control;
6
7 1
abstract class BaseControl extends Control
8
{
9
10
	const TEMPLATE_DIR = __DIR__ . '/../templates/components';
11
	const TEMPLATE_EXT = 'latte';
12
13
	/**
14
	 * @var integer
15
	 */
16
	protected $meetingId = null;
17
18
	/**
19
	 * @return integer
20
	 */
21
	public function getMeetingId()
22
	{
23 1
		return $this->meetingId;
24
	}
25
26
	/**
27
	 * @param  integer $id
28
	 * @return $this
29
	 */
30
	public function setMeetingId($id = null)
31
	{
32
		$this->meetingId = $id;
33
34
		return $this;
35
	}
36
37
	/**
38
	 * @return string
39
	 */
40
	protected function buildTemplatePath()
41
	{
42
		return sprintf(
43
			'%s/%s.%s',
44
			static::TEMPLATE_DIR,
45
			static::TEMPLATE_NAME,
46
			self::TEMPLATE_EXT
47
		);
48
	}
49
50
}
51