diff --git a/src/Listener/ViewListener.php b/src/Listener/ViewListener.php index 50f9f81a..cc30344a 100644 --- a/src/Listener/ViewListener.php +++ b/src/Listener/ViewListener.php @@ -379,15 +379,17 @@ protected function _getControllerActions() $scope = isset($config['scope']) ? $config['scope'] : 'entity'; $method = isset($config['method']) ? $config['method'] : 'GET'; + $title = !empty($config['link_title']) ? $config['link_title'] : Inflector::humanize(Inflector::underscore($actionName)); + ${$scope}[$actionName] = [ - 'title' => Inflector::humanize(Inflector::underscore($actionName)), + 'title' => $title, 'url' => [ 'action' => $actionName ], 'method' => $method, 'options' => array_diff_key( $config, - array_flip(['method', 'scope', 'className']) + array_flip(['method', 'scope', 'className', 'link_title']) ) ]; if (!empty($config['callback'])) {