GuestListGridFieldConfig   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Broarm\EventTickets;
4
5
use CalendarEvent;
6
use GridFieldAddNewButton;
7
use GridFieldConfig_RecordEditor;
8
9
/**
10
 * Class GuestListGridFieldConfig
11
 *
12
 * @author Bram de Leeuw
13
 * @package Broarm\EventTickets
14
 */
15
class GuestListGridFieldConfig extends ReservationGridFieldConfig
16
{
17
    /**
18
     * GuestListGridFieldConfig constructor.
19
     * @param CalendarEvent|TicketExtension $event
20
     * @param null $itemsPerPage
21
     */
22
    public function __construct(CalendarEvent $event, $itemsPerPage = null)
23
    {
24
        parent::__construct($itemsPerPage);
25
        $this->addComponent(new GridFieldAddNewButton('buttons-before-left'));
26
        $this->addComponent(new GuestListExportButton('buttons-before-left', $event->Fields()->map()->toArray()));
27
        $this->extend('updateGuestListConfig', $event);
28
    }
29
}
30