Completed
Branch Gutenberg/event-attendees-bloc... (683e90)
by
unknown
39:01 queued 25:57
created

EspressoVenueEditorEdit::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\route_match\specifications\admin;
4
5
use EventEspresso\core\domain\entities\route_match\RouteMatchSpecification;
6
7
/**
8
 * Class EspressoVenueEditorEdit
9
 * Returns true when the current request is for the Venue Editor admin page for an existing venue
10
 *
11
 * @package EventEspresso\core\domain\entities\route_match\specifications\admin
12
 * @author  Brent Christensen
13
 * @since   $VID:$
14
 */
15
class EspressoVenueEditorEdit extends RouteMatchSpecification
16
{
17
    /**
18
     * returns true if current request matches specification
19
     *
20
     * @since $VID:$
21
     * @return boolean
22
     */
23
    public function isMatchingRoute()
24
    {
25
        return $this->request->getRequestParam('page') === 'espresso_venues'
26
            && $this->request->getRequestParam('action') === 'edit';
27
    }
28
}
29