Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Conversation

@mbartok
Copy link
Contributor

@mbartok mbartok commented Feb 26, 2018

Symfony 4's PropertyAccessor uses primary add* method for adding properties, not set*. Since MultiselectColumn is derived from ActionColumn and MultiselectColumn didn't have a addAction method, PropertyAccessor uses addAction method from ActionColumn class, that creates Action objects, not MultiselectAction objects.

Symfony 4's PropertyAccessor uses primary add* method for adding properties, not set*. Since MultiselectColumn is derived from ActionColumn and MultiselectColumn didn't have a addAction method, PropertyAccessor uses addAction method from ActionColumn class, that creates Action objects, not MultiselectAction objects.
Fix for multiselect actions on Symfony 4
{
$newAction = new MultiselectAction($this->datatableName);
$this->actions[] = $newAction->set($action);
return $this;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://symfony.com/doc/current/contributing/code/standards.html

Add a blank line before return statements, unless the return is alone inside a statement-group (like an if statement);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants