Completed
Pull Request — staging (#840)
by
unknown
15:23
created

NoOverrideLocationView::get_locations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * YIKES Inc. Easy Forms.
4
 *
5
 * @package YIKES\EasyForms
6
 * @author  Freddie Mixell
7
 * @license GPL2
8
 */
9
10
namespace YIKES\EasyForms\View;
11
12
use YIKES\EasyForms\PluginHelper;
13
14
/**
15
 * Class NoOverrideLocationView
16
 *
17
 * This class works like TemplatedView, but does not allow overriding the
18
 * template file in a theme.
19
 *
20
 * @since   %VERSION%
21
 * @package YIKES\EasyForms
22
 */
23
class NoOverrideLocationView extends TemplatedView {
24
25
	use PluginHelper;
26
27
	/**
28
	 * Get the possible locations for the view.
29
	 *
30
	 * @since %VERSION%
31
	 *
32
	 * @param string $uri URI of the view to get the locations for.
33
	 *
34
	 * @return array Array of possible locations.
35
	 */
36
	protected function get_locations( $uri ) {
37
		return [
38
			trailingslashit( $this->get_root_dir() ) . $uri,
39
		];
40
	}
41
}
42