public function MyBlogLink::getRouteParameters in Blog 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Menu/MyBlogLink.php \Drupal\blog\Plugin\Menu\MyBlogLink::getRouteParameters()
Returns the route parameters, if available.
Return value
array An array of parameter names and values.
Overrides MenuLinkBase::getRouteParameters
File
- src/
Plugin/ Menu/ MyBlogLink.php, line 65
Class
- MyBlogLink
- Represents a menu link for "My blog".
Namespace
Drupal\blog\Plugin\MenuCode
public function getRouteParameters() {
if ($this->currentUser
->isAuthenticated()) {
$uid = $this->currentUser
->id();
return [
'arg_0' => $uid,
];
}
return [
'arg_0' => 0,
];
}