ActionType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 19 1
1
<?php
2
/*
3
 * This file is part of cwdFancyGridBundle
4
 *
5
 * (c)2017 cwd.at GmbH <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
declare(strict_types=1);
11
namespace Cwd\FancyGridBundle\Column;
12
13
use Cwd\FancyGridBundle\Grid\Exception\InvalidArgumentException;
14
use Symfony\Component\OptionsResolver\OptionsResolver;
15
use Symfony\Component\PropertyAccess\PropertyAccessor;
16
17
/**
18
 * Class ActionType
19
 * @package Cwd\FancyGridBundle\Column
20
 * @author Ludwig Ruderstaler <[email protected]>
21
 */
22
class ActionType extends AbstractColumn
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function configureOptions(OptionsResolver $resolver)
28
    {
29
        parent::configureOptions($resolver);
30
31
        $resolver->setDefaults(array(
32
            'align' => 'right',
33
            'searchable' => false,
34
            'sortable' => false,
35
            'actions' => [],
36
            'actions_params' => [],
37
            'filter' => false,
38
            'template' => 'CwdFancyGridBundle:Column:actions.html.twig',
39
            'width' => 200,
40
            'cls' => 'grid-action',
41
        ));
42
43
        $resolver->setAllowedTypes('actions', 'array');
44
        $resolver->setAllowedTypes('actions_params', 'array');
45
    }
46
}
47