Completed
Push — master ( 392d04...e48b3d )
by Pavel
02:16
created

TButtonCaret::setCaret()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/**
4
 * @copyright   Copyright (c) 2015 ublaboo <[email protected]>
5
 * @author      Pavel Janda <[email protected]>
6
 * @package     Ublaboo
7
 */
8
9
namespace Ublaboo\DataGrid\Traits;
10
11
trait TButtonCaret
12
{
13
14
	/**
15
	 * @var boolean
16
	 */
17
	protected $caret = TRUE;
18
19
20
	/**
21
	 * Should be a "caret" present in status dropdown?
22
	 * @param bool $use_caret
23
	 * @return static
24
	 */
25
	public function setCaret($use_caret)
26
	{
27
		$this->caret = (bool) $use_caret;
28
29
		return $this;
30
	}
31
32
33
	/**
34
	 * @return boolean
35
	 */
36
	public function hasCaret()
37
	{
38
		return $this->caret;
39
	}
40
41
}
42