-
Notifications
You must be signed in to change notification settings - Fork 236
Pass the container to the Factory so datatables and columns can be a service #784
Conversation
…service (optional)
Can you give more explanations? This makes able to call |
$this->container->get('...') is only possible when the service is public. |
# Conflicts: # Datatable/AbstractDatatable.php
# Conflicts: # Datatable/AbstractDatatable.php # Datatable/Column/ColumnBuilder.php
…lias uses in joins.
@darylholling Please take a look at #903. I think that's a better way of having columns as a service. What do you think? |
Hello @stephanvierkant, I think you are confusing my PR (#784) and the one of my college @darylholling (#904) :-) The approach of #903 seems fine to me, you may decline this PR. As soon as #904 has been released we can stop using fork.. Also I see this PR is based on the master branche of our fork, causing later improvements of us to be included in this PR. So another reason to use #903 instead of this one. |
Closed in favour of #903. Thanks for your contribution nevertheless! |
In our custom columns we needed the Symfony Translator, which wasn't passed through the constructor.
By making the columns (and the datatables) a service, dependency injection becomes available.
Also added some missing composer requirements to require-dev for better code completion.