forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReportSettingsType.php
73 lines (66 loc) · 2.07 KB
/
ReportSettingsType.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
namespace Mautic\ReportBundle\Form\Type;
use Mautic\CoreBundle\Form\Type\YesNoButtonGroupType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
/**
* Class ReportSettingsType.
*/
class ReportSettingsType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add(
'showGraphsAboveTable',
YesNoButtonGroupType::class,
[
'label' => 'mautic.report.report.form.display.graphs.above.table',
'attr' => [
'class' => 'filter-value',
],
'data' => !empty($options['data']['showGraphsAboveTable']) ? $options['data']['showGraphsAboveTable'] : false,
]
);
$builder->add(
'showDynamicFilters',
YesNoButtonGroupType::class,
[
'label' => 'mautic.report.report.form.display.show.dynamic.filters',
'attr' => [
'class' => 'filter-value',
],
'data' => !empty($options['data']['showDynamicFilters']) ? $options['data']['showDynamicFilters'] : false,
]
);
$builder->add(
'hideDateRangeFilter',
YesNoButtonGroupType::class,
[
'label' => 'mautic.report.report.form.display.hide.date.ranges',
'attr' => [
'class' => 'filter-value',
],
'data' => !empty($options['data']['hideDateRangeFilter']) ? $options['data']['hideDateRangeFilter'] : false,
]
);
}
/**
* @return string
*/
public function getBlockPrefix()
{
return 'report_settings';
}
}