Completed
Push — master ( c32a94...a966d5 )
by Joas
17:48
created
core/Command/Group/RemoveUser.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -33,47 +33,47 @@
 block discarded – undo
33 33
 use Symfony\Component\Console\Output\OutputInterface;
34 34
 
35 35
 class RemoveUser extends Base {
36
-	/** @var IUserManager */
37
-	protected $userManager;
38
-	/** @var IGroupManager */
39
-	protected $groupManager;
36
+    /** @var IUserManager */
37
+    protected $userManager;
38
+    /** @var IGroupManager */
39
+    protected $groupManager;
40 40
 
41
-	/**
42
-	 * @param IUserManager $userManager
43
-	 * @param IGroupManager $groupManager
44
-	 */
45
-	public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
46
-		$this->userManager = $userManager;
47
-		$this->groupManager = $groupManager;
48
-		parent::__construct();
49
-	}
41
+    /**
42
+     * @param IUserManager $userManager
43
+     * @param IGroupManager $groupManager
44
+     */
45
+    public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
46
+        $this->userManager = $userManager;
47
+        $this->groupManager = $groupManager;
48
+        parent::__construct();
49
+    }
50 50
 
51
-	protected function configure() {
52
-		$this
53
-			->setName('group:removeuser')
54
-			->setDescription('remove a user from a group')
55
-			->addArgument(
56
-				'group',
57
-				InputArgument::REQUIRED,
58
-				'group to remove the user from'
59
-			)->addArgument(
60
-				'user',
61
-				InputArgument::REQUIRED,
62
-				'user to remove from the group'
63
-			);
64
-	}
51
+    protected function configure() {
52
+        $this
53
+            ->setName('group:removeuser')
54
+            ->setDescription('remove a user from a group')
55
+            ->addArgument(
56
+                'group',
57
+                InputArgument::REQUIRED,
58
+                'group to remove the user from'
59
+            )->addArgument(
60
+                'user',
61
+                InputArgument::REQUIRED,
62
+                'user to remove from the group'
63
+            );
64
+    }
65 65
 
66
-	protected function execute(InputInterface $input, OutputInterface $output) {
67
-		$group = $this->groupManager->get($input->getArgument('group'));
68
-		if (is_null($group)) {
69
-			$output->writeln('<error>group not found</error>');
70
-			return 1;
71
-		}
72
-		$user = $this->userManager->get($input->getArgument('user'));
73
-		if (is_null($user)) {
74
-			$output->writeln('<error>user not found</error>');
75
-			return 1;
76
-		}
77
-		$group->removeUser($user);
78
-	}
66
+    protected function execute(InputInterface $input, OutputInterface $output) {
67
+        $group = $this->groupManager->get($input->getArgument('group'));
68
+        if (is_null($group)) {
69
+            $output->writeln('<error>group not found</error>');
70
+            return 1;
71
+        }
72
+        $user = $this->userManager->get($input->getArgument('user'));
73
+        if (is_null($user)) {
74
+            $output->writeln('<error>user not found</error>');
75
+            return 1;
76
+        }
77
+        $group->removeUser($user);
78
+    }
79 79
 }
Please login to merge, or discard this patch.
core/Command/Group/AddUser.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -33,47 +33,47 @@
 block discarded – undo
33 33
 use Symfony\Component\Console\Output\OutputInterface;
34 34
 
35 35
 class AddUser extends Base {
36
-	/** @var IUserManager */
37
-	protected $userManager;
38
-	/** @var IGroupManager */
39
-	protected $groupManager;
36
+    /** @var IUserManager */
37
+    protected $userManager;
38
+    /** @var IGroupManager */
39
+    protected $groupManager;
40 40
 
41
-	/**
42
-	 * @param IUserManager $userManager
43
-	 * @param IGroupManager $groupManager
44
-	 */
45
-	public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
46
-		$this->userManager = $userManager;
47
-		$this->groupManager = $groupManager;
48
-		parent::__construct();
49
-	}
41
+    /**
42
+     * @param IUserManager $userManager
43
+     * @param IGroupManager $groupManager
44
+     */
45
+    public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
46
+        $this->userManager = $userManager;
47
+        $this->groupManager = $groupManager;
48
+        parent::__construct();
49
+    }
50 50
 
51
-	protected function configure() {
52
-		$this
53
-			->setName('group:adduser')
54
-			->setDescription('add a user to a group')
55
-			->addArgument(
56
-				'group',
57
-				InputArgument::REQUIRED,
58
-				'group to add the user to'
59
-			)->addArgument(
60
-				'user',
61
-				InputArgument::REQUIRED,
62
-				'user to add to the group'
63
-			);
64
-	}
51
+    protected function configure() {
52
+        $this
53
+            ->setName('group:adduser')
54
+            ->setDescription('add a user to a group')
55
+            ->addArgument(
56
+                'group',
57
+                InputArgument::REQUIRED,
58
+                'group to add the user to'
59
+            )->addArgument(
60
+                'user',
61
+                InputArgument::REQUIRED,
62
+                'user to add to the group'
63
+            );
64
+    }
65 65
 
66
-	protected function execute(InputInterface $input, OutputInterface $output) {
67
-		$group = $this->groupManager->get($input->getArgument('group'));
68
-		if (is_null($group)) {
69
-			$output->writeln('<error>group not found</error>');
70
-			return 1;
71
-		}
72
-		$user = $this->userManager->get($input->getArgument('user'));
73
-		if (is_null($user)) {
74
-			$output->writeln('<error>user not found</error>');
75
-			return 1;
76
-		}
77
-		$group->addUser($user);
78
-	}
66
+    protected function execute(InputInterface $input, OutputInterface $output) {
67
+        $group = $this->groupManager->get($input->getArgument('group'));
68
+        if (is_null($group)) {
69
+            $output->writeln('<error>group not found</error>');
70
+            return 1;
71
+        }
72
+        $user = $this->userManager->get($input->getArgument('user'));
73
+        if (is_null($user)) {
74
+            $output->writeln('<error>user not found</error>');
75
+            return 1;
76
+        }
77
+        $group->addUser($user);
78
+    }
79 79
 }
Please login to merge, or discard this patch.
settings/templates/users/main.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 script('settings', [
9
-	'users/deleteHandler',
10
-	'users/filter',
11
-	'users/users',
12
-	'users/groups'
9
+    'users/deleteHandler',
10
+    'users/filter',
11
+    'users/users',
12
+    'users/groups'
13 13
 ]);
14 14
 script('core', [
15
-	'multiselect',
16
-	'singleselect'
15
+    'multiselect',
16
+    'singleselect'
17 17
 ]);
18 18
 style('settings', 'settings');
19 19
 
20 20
 $userlistParams = array();
21 21
 $allGroups=array();
22 22
 foreach($_["adminGroup"] as $group) {
23
-	$allGroups[] = $group['name'];
23
+    $allGroups[] = $group['name'];
24 24
 }
25 25
 foreach($_["groups"] as $group) {
26
-	$allGroups[] = $group['name'];
26
+    $allGroups[] = $group['name'];
27 27
 }
28 28
 $userlistParams['subadmingroups'] = $allGroups;
29 29
 $userlistParams['allGroups'] = json_encode($allGroups);
Please login to merge, or discard this patch.
settings/Controller/LogSettingsController.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,17 +41,17 @@
 block discarded – undo
41 41
  * @package OC\Settings\Controller
42 42
  */
43 43
 class LogSettingsController extends Controller {
44
-	/**
45
-	 * download logfile
46
-	 *
47
-	 * @NoCSRFRequired
48
-	 *
49
-	 * @return StreamResponse
50
-	 */
51
-	public function download() {
52
-		$resp = new StreamResponse(\OC\Log\File::getLogFilePath());
53
-		$resp->addHeader('Content-Type', 'application/octet-stream');
54
-		$resp->addHeader('Content-Disposition', 'attachment; filename="nextcloud.log"');
55
-		return $resp;
56
-	}
44
+    /**
45
+     * download logfile
46
+     *
47
+     * @NoCSRFRequired
48
+     *
49
+     * @return StreamResponse
50
+     */
51
+    public function download() {
52
+        $resp = new StreamResponse(\OC\Log\File::getLogFilePath());
53
+        $resp->addHeader('Content-Type', 'application/octet-stream');
54
+        $resp->addHeader('Content-Disposition', 'attachment; filename="nextcloud.log"');
55
+        return $resp;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
settings/Controller/SecuritySettingsController.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -31,41 +31,41 @@
 block discarded – undo
31 31
  * @package OC\Settings\Controller
32 32
  */
33 33
 class SecuritySettingsController extends Controller {
34
-	/** @var \OCP\IConfig */
35
-	private $config;
34
+    /** @var \OCP\IConfig */
35
+    private $config;
36 36
 
37
-	/**
38
-	 * @param string $appName
39
-	 * @param IRequest $request
40
-	 * @param IConfig $config
41
-	 */
42
-	public function __construct($appName,
43
-								IRequest $request,
44
-								IConfig $config) {
45
-		parent::__construct($appName, $request);
46
-		$this->config = $config;
47
-	}
37
+    /**
38
+     * @param string $appName
39
+     * @param IRequest $request
40
+     * @param IConfig $config
41
+     */
42
+    public function __construct($appName,
43
+                                IRequest $request,
44
+                                IConfig $config) {
45
+        parent::__construct($appName, $request);
46
+        $this->config = $config;
47
+    }
48 48
 
49
-	/**
50
-	 * @return array
51
-	 */
52
-	protected function returnSuccess() {
53
-		return array(
54
-			'status' => 'success'
55
-		);
56
-	}
49
+    /**
50
+     * @return array
51
+     */
52
+    protected function returnSuccess() {
53
+        return array(
54
+            'status' => 'success'
55
+        );
56
+    }
57 57
 
58
-	/**
59
-	 * Add a new trusted domain
60
-	 * @param string $newTrustedDomain The newly to add trusted domain
61
-	 * @return array
62
-	 */
63
-	public function trustedDomains($newTrustedDomain) {
64
-		$trustedDomains = $this->config->getSystemValue('trusted_domains', []);
65
-		$trustedDomains[] = $newTrustedDomain;
66
-		$this->config->setSystemValue('trusted_domains', $trustedDomains);
58
+    /**
59
+     * Add a new trusted domain
60
+     * @param string $newTrustedDomain The newly to add trusted domain
61
+     * @return array
62
+     */
63
+    public function trustedDomains($newTrustedDomain) {
64
+        $trustedDomains = $this->config->getSystemValue('trusted_domains', []);
65
+        $trustedDomains[] = $newTrustedDomain;
66
+        $this->config->setSystemValue('trusted_domains', $trustedDomains);
67 67
 
68
-		return $this->returnSuccess();
69
-	}
68
+        return $this->returnSuccess();
69
+    }
70 70
 
71 71
 }
Please login to merge, or discard this patch.
settings/Controller/GroupsController.php 1 patch
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -37,126 +37,126 @@
 block discarded – undo
37 37
  * @package OC\Settings\Controller
38 38
  */
39 39
 class GroupsController extends Controller {
40
-	/** @var IGroupManager */
41
-	private $groupManager;
42
-	/** @var IL10N */
43
-	private $l10n;
44
-	/** @var IUserSession */
45
-	private $userSession;
46
-	/** @var bool */
47
-	private $isAdmin;
40
+    /** @var IGroupManager */
41
+    private $groupManager;
42
+    /** @var IL10N */
43
+    private $l10n;
44
+    /** @var IUserSession */
45
+    private $userSession;
46
+    /** @var bool */
47
+    private $isAdmin;
48 48
 
49
-	/**
50
-	 * @param string $appName
51
-	 * @param IRequest $request
52
-	 * @param IGroupManager $groupManager
53
-	 * @param IUserSession $userSession
54
-	 * @param bool $isAdmin
55
-	 * @param IL10N $l10n
56
-	 */
57
-	public function __construct($appName,
58
-								IRequest $request,
59
-								IGroupManager $groupManager,
60
-								IUserSession $userSession,
61
-								$isAdmin,
62
-								IL10N $l10n) {
63
-		parent::__construct($appName, $request);
64
-		$this->groupManager = $groupManager;
65
-		$this->userSession = $userSession;
66
-		$this->isAdmin = $isAdmin;
67
-		$this->l10n = $l10n;
68
-	}
49
+    /**
50
+     * @param string $appName
51
+     * @param IRequest $request
52
+     * @param IGroupManager $groupManager
53
+     * @param IUserSession $userSession
54
+     * @param bool $isAdmin
55
+     * @param IL10N $l10n
56
+     */
57
+    public function __construct($appName,
58
+                                IRequest $request,
59
+                                IGroupManager $groupManager,
60
+                                IUserSession $userSession,
61
+                                $isAdmin,
62
+                                IL10N $l10n) {
63
+        parent::__construct($appName, $request);
64
+        $this->groupManager = $groupManager;
65
+        $this->userSession = $userSession;
66
+        $this->isAdmin = $isAdmin;
67
+        $this->l10n = $l10n;
68
+    }
69 69
 
70
-	/**
71
-	 * @NoAdminRequired
72
-	 *
73
-	 * @param string $pattern
74
-	 * @param bool $filterGroups
75
-	 * @param int $sortGroups
76
-	 * @return DataResponse
77
-	 */
78
-	public function index($pattern = '', $filterGroups = false, $sortGroups = MetaData::SORT_USERCOUNT) {
79
-		$groupPattern = $filterGroups ? $pattern : '';
70
+    /**
71
+     * @NoAdminRequired
72
+     *
73
+     * @param string $pattern
74
+     * @param bool $filterGroups
75
+     * @param int $sortGroups
76
+     * @return DataResponse
77
+     */
78
+    public function index($pattern = '', $filterGroups = false, $sortGroups = MetaData::SORT_USERCOUNT) {
79
+        $groupPattern = $filterGroups ? $pattern : '';
80 80
 
81
-		$groupsInfo = new MetaData(
82
-			$this->userSession->getUser()->getUID(),
83
-			$this->isAdmin,
84
-			$this->groupManager,
85
-			$this->userSession
86
-		);
87
-		$groupsInfo->setSorting($sortGroups);
88
-		list($adminGroups, $groups) = $groupsInfo->get($groupPattern, $pattern);
81
+        $groupsInfo = new MetaData(
82
+            $this->userSession->getUser()->getUID(),
83
+            $this->isAdmin,
84
+            $this->groupManager,
85
+            $this->userSession
86
+        );
87
+        $groupsInfo->setSorting($sortGroups);
88
+        list($adminGroups, $groups) = $groupsInfo->get($groupPattern, $pattern);
89 89
 
90
-		return new DataResponse(
91
-			array(
92
-				'data' => array('adminGroups' => $adminGroups, 'groups' => $groups)
93
-			)
94
-		);
95
-	}
90
+        return new DataResponse(
91
+            array(
92
+                'data' => array('adminGroups' => $adminGroups, 'groups' => $groups)
93
+            )
94
+        );
95
+    }
96 96
 
97
-	/**
98
-	 * @PasswordConfirmationRequired
99
-	 * @param string $id
100
-	 * @return DataResponse
101
-	 */
102
-	public function create($id) {
103
-		if($this->groupManager->groupExists($id)) {
104
-			return new DataResponse(
105
-				array(
106
-					'message' => (string)$this->l10n->t('Group already exists.')
107
-				),
108
-				Http::STATUS_CONFLICT
109
-			);
110
-		}
111
-		if($this->groupManager->createGroup($id)) {
112
-			return new DataResponse(
113
-				array(
114
-					'groupname' => $id
115
-				),
116
-				Http::STATUS_CREATED
117
-			);
118
-		}
97
+    /**
98
+     * @PasswordConfirmationRequired
99
+     * @param string $id
100
+     * @return DataResponse
101
+     */
102
+    public function create($id) {
103
+        if($this->groupManager->groupExists($id)) {
104
+            return new DataResponse(
105
+                array(
106
+                    'message' => (string)$this->l10n->t('Group already exists.')
107
+                ),
108
+                Http::STATUS_CONFLICT
109
+            );
110
+        }
111
+        if($this->groupManager->createGroup($id)) {
112
+            return new DataResponse(
113
+                array(
114
+                    'groupname' => $id
115
+                ),
116
+                Http::STATUS_CREATED
117
+            );
118
+        }
119 119
 
120
-		return new DataResponse(
121
-			array(
122
-				'status' => 'error',
123
-				'data' => array(
124
-					'message' => (string)$this->l10n->t('Unable to add group.')
125
-				)
126
-			),
127
-			Http::STATUS_FORBIDDEN
128
-		);
129
-	}
120
+        return new DataResponse(
121
+            array(
122
+                'status' => 'error',
123
+                'data' => array(
124
+                    'message' => (string)$this->l10n->t('Unable to add group.')
125
+                )
126
+            ),
127
+            Http::STATUS_FORBIDDEN
128
+        );
129
+    }
130 130
 
131
-	/**
132
-	 * @PasswordConfirmationRequired
133
-	 * @param string $id
134
-	 * @return DataResponse
135
-	 */
136
-	public function destroy($id) {
137
-		$group = $this->groupManager->get($id);
138
-		if ($group) {
139
-			if ($group->delete()) {
140
-				return new DataResponse(
141
-					array(
142
-						'status' => 'success',
143
-						'data' => array(
144
-							'groupname' => $id
145
-						)
146
-					),
147
-					Http::STATUS_NO_CONTENT
148
-				);
149
-			}
150
-		}
151
-		return new DataResponse(
152
-			array(
153
-				'status' => 'error',
154
-				'data' => array(
155
-					'message' => (string)$this->l10n->t('Unable to delete group.')
156
-				),
157
-			),
158
-			Http::STATUS_FORBIDDEN
159
-		);
160
-	}
131
+    /**
132
+     * @PasswordConfirmationRequired
133
+     * @param string $id
134
+     * @return DataResponse
135
+     */
136
+    public function destroy($id) {
137
+        $group = $this->groupManager->get($id);
138
+        if ($group) {
139
+            if ($group->delete()) {
140
+                return new DataResponse(
141
+                    array(
142
+                        'status' => 'success',
143
+                        'data' => array(
144
+                            'groupname' => $id
145
+                        )
146
+                    ),
147
+                    Http::STATUS_NO_CONTENT
148
+                );
149
+            }
150
+        }
151
+        return new DataResponse(
152
+            array(
153
+                'status' => 'error',
154
+                'data' => array(
155
+                    'message' => (string)$this->l10n->t('Unable to delete group.')
156
+                ),
157
+            ),
158
+            Http::STATUS_FORBIDDEN
159
+        );
160
+    }
161 161
 
162 162
 }
Please login to merge, or discard this patch.
settings/help.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
 
37 37
 
38 38
 if(isset($_GET['mode']) and $_GET['mode'] === 'admin') {
39
-	$url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' );
40
-	$style1='';
41
-	$style2=' active';
39
+    $url=\OCP\Util::linkToAbsolute( 'core', 'doc/admin/index.html' );
40
+    $style1='';
41
+    $style2=' active';
42 42
 }else{
43
-	$url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' );
44
-	$style1=' active';
45
-	$style2='';
43
+    $url=\OCP\Util::linkToAbsolute( 'core', 'doc/user/index.html' );
44
+    $style1=' active';
45
+    $style2='';
46 46
 }
47 47
 
48 48
 $url1=\OC::$server->getURLGenerator()->linkToRoute('settings_help').'?mode=user';
Please login to merge, or discard this patch.
lib/private/Contacts/ContactsMenu/ActionFactory.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 
31 31
 class ActionFactory implements IActionFactory {
32 32
 
33
-	/**
34
-	 * @param string $icon
35
-	 * @param string $name
36
-	 * @param string $href
37
-	 * @return ILinkAction
38
-	 */
39
-	public function newLinkAction($icon, $name, $href) {
40
-		$action = new LinkAction();
41
-		$action->setName($name);
42
-		$action->setIcon($icon);
43
-		$action->setHref($href);
44
-		return $action;
45
-	}
33
+    /**
34
+     * @param string $icon
35
+     * @param string $name
36
+     * @param string $href
37
+     * @return ILinkAction
38
+     */
39
+    public function newLinkAction($icon, $name, $href) {
40
+        $action = new LinkAction();
41
+        $action->setName($name);
42
+        $action->setIcon($icon);
43
+        $action->setHref($href);
44
+        return $action;
45
+    }
46 46
 
47
-	/**
48
-	 * @param string $icon
49
-	 * @param string $name
50
-	 * @param string $email
51
-	 * @return ILinkAction
52
-	 */
53
-	public function newEMailAction($icon, $name, $email) {
54
-		return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email));
55
-	}
47
+    /**
48
+     * @param string $icon
49
+     * @param string $name
50
+     * @param string $email
51
+     * @return ILinkAction
52
+     */
53
+    public function newEMailAction($icon, $name, $email) {
54
+        return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email));
55
+    }
56 56
 
57 57
 }
Please login to merge, or discard this patch.
lib/private/Contacts/ContactsMenu/Actions/LinkAction.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -28,76 +28,76 @@
 block discarded – undo
28 28
 
29 29
 class LinkAction implements ILinkAction {
30 30
 
31
-	/** @var string */
32
-	private $icon;
33
-
34
-	/** @var string */
35
-	private $name;
36
-
37
-	/** @var string */
38
-	private $href;
39
-
40
-	/** @var int */
41
-	private $priority = 10;
42
-
43
-	/**
44
-	 * @param string $icon absolute URI to an icon
45
-	 */
46
-	public function setIcon($icon) {
47
-		$this->icon = $icon;
48
-	}
49
-
50
-	/**
51
-	 * @param string $name
52
-	 */
53
-	public function setName($name) {
54
-		$this->name = $name;
55
-	}
56
-
57
-	/**
58
-	 * @return string
59
-	 */
60
-	public function getName() {
61
-		return $this->name;
62
-	}
63
-
64
-	/**
65
-	 * @param int $priority
66
-	 */
67
-	public function setPriority($priority) {
68
-		$this->priority = $priority;
69
-	}
70
-
71
-	/**
72
-	 * @return int
73
-	 */
74
-	public function getPriority() {
75
-		return $this->priority;
76
-	}
77
-
78
-	/**
79
-	 * @param string $href
80
-	 */
81
-	public function setHref($href) {
82
-		$this->href = $href;
83
-	}
84
-
85
-	/**
86
-	 * @return string
87
-	 */
88
-	public function getHref() {
89
-		return $this->href;
90
-	}
91
-
92
-	/**
93
-	 * @return array
94
-	 */
95
-	public function jsonSerialize() {
96
-		return [
97
-			'title' => $this->name,
98
-			'icon' => $this->icon,
99
-			'hyperlink' => $this->href,
100
-		];
101
-	}
31
+    /** @var string */
32
+    private $icon;
33
+
34
+    /** @var string */
35
+    private $name;
36
+
37
+    /** @var string */
38
+    private $href;
39
+
40
+    /** @var int */
41
+    private $priority = 10;
42
+
43
+    /**
44
+     * @param string $icon absolute URI to an icon
45
+     */
46
+    public function setIcon($icon) {
47
+        $this->icon = $icon;
48
+    }
49
+
50
+    /**
51
+     * @param string $name
52
+     */
53
+    public function setName($name) {
54
+        $this->name = $name;
55
+    }
56
+
57
+    /**
58
+     * @return string
59
+     */
60
+    public function getName() {
61
+        return $this->name;
62
+    }
63
+
64
+    /**
65
+     * @param int $priority
66
+     */
67
+    public function setPriority($priority) {
68
+        $this->priority = $priority;
69
+    }
70
+
71
+    /**
72
+     * @return int
73
+     */
74
+    public function getPriority() {
75
+        return $this->priority;
76
+    }
77
+
78
+    /**
79
+     * @param string $href
80
+     */
81
+    public function setHref($href) {
82
+        $this->href = $href;
83
+    }
84
+
85
+    /**
86
+     * @return string
87
+     */
88
+    public function getHref() {
89
+        return $this->href;
90
+    }
91
+
92
+    /**
93
+     * @return array
94
+     */
95
+    public function jsonSerialize() {
96
+        return [
97
+            'title' => $this->name,
98
+            'icon' => $this->icon,
99
+            'hyperlink' => $this->href,
100
+        ];
101
+    }
102 102
 
103 103
 }
Please login to merge, or discard this patch.