Skip to content

Commit

Permalink
Prevent Action class config ending up as action link attributes.
Browse files Browse the repository at this point in the history
Before this fix keys like "viewVar", "findMethod" etc. set for Action class config,
and key "callback" ended up as HTML attributes for action links in templates.
  • Loading branch information
ADmad committed Apr 3, 2018
1 parent b3b37e7 commit 42aedce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Listener/ViewListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ protected function _getControllerActionConfiguration($actionName, $config)
'method' => $method,
'options' => array_diff_key(
$config,
array_flip(['method', 'scope', 'className', 'link_title', 'messages', 'url', 'scaffold'])
array_flip(['method', 'scope', 'link_title', 'url', 'scaffold', 'callback'])
)
];
if (!empty($config['callback'])) {
Expand All @@ -467,7 +467,7 @@ protected function _getAllowedActions()
{
$actions = $this->_action()->getConfig('scaffold.actions');
if ($actions === null) {
$actions = $this->_crud()->getConfig('actions');
$actions = array_keys($this->_crud()->getConfig('actions'));
}

$extraActions = $this->_action()->getConfig('scaffold.extra_actions') ?: [];
Expand Down

0 comments on commit 42aedce

Please sign in to comment.