Completed
Pull Request — master (#28)
by Daniel
02:29
created

SelectCell::getInputName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\View\Cell;
6
7
use Psi\Component\Grid\ColumnInterface;
8
use Psi\Component\Grid\CellInterface;
9
10
class SelectCell implements CellInterface
11
{
12
    const INPUT_NAME = '__select__';
13
14
    private $identifier;
15
16
    public function __construct($identifier)
17
    {
18
        $this->identifier = $identifier;
19
    }
20
21
    public function getInputName()
22
    {
23
        return sprintf('%s[%s]', self::INPUT_NAME, $this->identifier);
24
    }
25
26
    public function getValue()
27
    {
28
        return $this->identifier;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getVariant()
35
    {
36
    }
37
}
38