User tests: Successful: 0 Unsuccessful: 0
While developing a component that can be used in different components by a URL parameter &extension=com_something
like it is done in com_categories, I'm using the getRedirectToListAppend
/ getRedirectToItemAppend
methods in my controllers derived from FormController
to ensure that the extension URL parameter is attached correctly when editing, saving or exiting an item. However, I noticed that the AdminController
lacks such a method. When looking at the overrides that already the Joomla! core has for delete
, publish
and checkin
, I thought that not only 3rd party components would profit from such a method, but also the core methods that could be simplified.
AdminController::getRedirectToListAppend
.Using this method, I changed the following overrides:
AdminController::delete
AdminController
implementationAdminController
implementationAdminController::publish
AdminController::checkin
AdminController
implementationI implemented the getRedirectToListAppend
as an empty stub in AdminController
. If we want to consider common URL parameters, some default could be added here. For example, the publish
method already added an extension
parameter, while delete
and checkin
didn't. I deleted this for the sake of consistency, but as I'm writing this, I tend to add it as a default to getRedirectToListAppend
to avoid issues for 3rd party components that were relying on this behaviour of publish
. What do you think?
I didn't change the methods saveorder
and reorder
, because I couldn't find any place where they are used, except for the old quickicons from 1.5, where the order could be changed with arrows up / down and a save icon on top of the column. But I assume those are not used anymore, either.
publish
by calling the parent method and then setting the redirect to 'index.php?option=com_content&view=featured'
. If "featured" was the value for $this->view_list
, this override would be redundant in my POV. But I can't verify this, because I don't see where this method is called. When publishing an article in the "featured" view, the method is called by ArticlesController
, not by FeaturedController
.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories com_content com_contenthistory com_menus com_workflow Libraries |
Labels |
Added:
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-09-02 13:26:49 |
Closed_By | ⇒ | wilsonge |
Thanks!
This looks very sensible to me