Conversation
|
@bennothommo can we add a |
This reverts commit e1bb6af.
|
@bennothommo @jaxwilko any input on this? |
|
@mjauvin @LukeTowers I just want to be sure that you are wanting this to fire on every single instance of an extendable class (not just models)? |
|
@bennothommo yes, in my case that I needed it for I wanted to be able to call addAssets() on a widget implementing a behaviour to implement the required assets for that behaviour so long as it's conditions for enabling itself were met. However, I was unable to call the methods that behaviour added to the widget (which were required to determine if it was eligible to run and thus add the assets in the constructor of the behaviour. Perhaps we could also implement this by calling |
|
@LukeTowers personally, I'd introduce another parameter to |
|
@bennothommo I was thinking more along the lines of Laravel's bootable Eloquent traits, i.e. the behaviour would add a method called |
|
@LukeTowers that's a much more wild change to the current API than my suggestion though 😜 |
|
Is it? It's fairly unobtrusive IMO, it's an optional method that be implemented by the behaviour to hook into after all of the behaviours have been registered. |
|
How would you propose that someone leverages it? Would it be part of an My suggestion is simply an extra parameter to |
|
I don't remember what @mjauvin's use case of it was, but it wasn't so much external usage of it but instead internal usage by the behaviour itself in order to do setup tasks that require the method proxying to be in place on the object that's implementing them before they can do certain tasks. |
|
My use case is to be able to call behavior's methods within the extend() callback. So @bennothommo's suggestion would work for me I believe. |
|
I'd like to be able to do the following: |
|
Replaced by #113 |
The event fires once the behaviors have been loaded.