Completed
Push — feature/ss4-upgrade ( f41a3f )
by
unknown
10:12
created

SubmitAddonController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 3
dl 0
loc 28
c 0
b 0
f 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 4 1
A Title() 0 4 1
A Link() 0 4 1
A MenuItemType() 0 4 1
1
<?php
2
3
namespace SilverStripe\Addons\Controllers;
4
5
use SilverStripe\Control\Controller;
6
use SilverStripe\Control\Director;
7
8
/**
9
 * Instructions on how to submit a module.
10
 * Doesn't actually handle the submission itself,
11
 * that's left to packagist.org.
12
 */
13
class SubmitAddonController extends SiteController 
14
{
15
16
	private static $allowed_actions = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
17
		'index',
18
	];
19
20
	public function index() 
21
	{
22
		return $this->renderWith(array('SubmitAddon', 'Page'));
23
	}
24
25
	public function Title() 
26
	{
27
		return 'Submit';
28
	}
29
30
	public function Link() 
31
	{
32
		return Controller::join_links(Director::baseURL(), 'submit');
33
	}
34
35
	public function MenuItemType() 
36
	{
37
		return 'button';
38
	}
39
40
}
41