-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create the Notify plugin to make use of the new Widget::Time
helper.
#783
Comments
I believe it's left as part of the Theoretically you could just include the I like this and we should strive to have more modular classes like this, so I think it can stay where it is to be honest. |
I think what I don't like is that the function generates markup whereas the rest of the class does not. |
Agree. What about a |
I wasn't sure initially, but maybe that's a good idea. |
Perhaps the method could return an array of two elements, the first being |
In an ideal world, the returned array you described could be passed as variable to
|
Yeah that's a good idea! |
Sounds good to me. Either of you want to take it on? |
;) |
Awesome, thanks :D |
eheh, we need you taking care of more important stuff! |
Uhm, before getting my hands dirty with that: a quick
It's relatively easy to bulk replace every occurrence with the new one, but I'd like to pause and think of the real benefit of that. Apart from making the class "semantically correct", is this change going to introduce more tangible benefits? How many extensions would be affected by that? Is it worth the pain? Sorry for asking, I just want to make sure that we are doing the right thing here. |
It will affect any extension that provides it's own I don't see any real benefits either, so as I previously said, I'm happy for it to remain where it is. |
For me it's conceptually wrong, so I'm all for the change. |
If it kills other extensions then I'm not sure. A quick search found a lot of extensions. If you need the raw "time ago" value we could add another parameter to this method to return just the date and no markup, but it remains defaulting to markup. I agree that it's conceptually in the wrong place, but kind of a pain for extension developers to change everywhere. |
I've been thinking about this again, and maybe I found a solution we can all agree on:
In the long run, we'll have a cleaned-up What do you think? |
Handing this task off to Nils who's got a better understanding of the issue :) |
…b6f8e0f73d14b4 Deprecate DateTimeObj::getTimeAgo(), add Widget::Time. RE: #783.
So next step is to change the core to use the new |
I'm not sure if
getTimeAgo()
should be part of theDateTimeObj
or if it shouldn't be a widget instead:https://github.com/symphonycms/symphony-2/blob/integration/symphony/lib/core/class.datetimeobj.php#L314-316
The text was updated successfully, but these errors were encountered: