Completed
Branch EDTR/master (da238f)
by
unknown
09:58 queued 01:23
created

EspressoEventEditorEdit::isMatchingRoute()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\entities\routing\specifications\admin;
4
5
use EventEspresso\core\domain\entities\routing\specifications\RouteMatchSpecification;
6
7
/**
8
 * Class EspressoEventEditorEdit
9
 * Returns true when the current request is for the Event Editor admin page for an existing event
10
 *
11
 * @package EventEspresso\core\domain\entities\routing\specifications
12
 * @author  Brent Christensen
13
 * @since   4.9.71.p
14
 */
15
class EspressoEventEditorEdit extends RouteMatchSpecification
16
{
17
    /**
18
     * returns true if current request matches specification
19
     *
20
     * @since 4.9.71.p
21
     * @return boolean
22
     */
23
    public function isMatchingRoute()
24
    {
25
        return $this->request->getRequestParam('page') === 'espresso_events'
26
            && $this->request->getRequestParam('action') === 'edit';
27
    }
28
}
29