Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@digitaldonkey I've refactored as suggested here:
Moved status report functionality into a separate controller, called "EthereumStatusPageController". Moved the previous EthereumUIController code into EthereumController - we can use this for miscellaneous ethereum module controller routines.
I renamed the "ajaxOperation" method to "performOperation" - this was done because the method itself actually functions to perform an operation, and the ajax functionality is just an optional part of it, even though we do enforce the ajax in our current implementation. Feels more appropriate to me...
In the new EthereumStatusPageController I just extended the EthereumController class, as I see this was done in, e.g. EthereumSignupController.
If you'd prefer me to extend ControllerBase let me know. I also see that some controllers (e.g. RestUIController) implement ContainerInjectionInterface. I'm relatively new to D8 development so will need to do some reading in this regard to understand the most appropriate implementation.
ControllerBase.php says the following:
Controllers that use this base class have access to a number of utility methods and to the Container, which can greatly reduce boilerplate dependency handling code. However, it also makes the class considerably more difficult to unit test. Therefore this base class should only be used by controller classes that contain only trivial glue code. Controllers that contain sufficiently complex logic that it's worth testing should not use this base class but use ContainerInjectionInterface instead, or even better be refactored to be trivial glue code.
@digitaldonkey or @amateescu - if you guys have any thoughts on the best approach here, feel free to point me in the right direction :-)