Why keep using "published" as a status column item?

104 views
Skip to first unread message

Carlos Rodríguez

unread,
Dec 30, 2015, 3:00:54 PM12/30/15
to Joomla! CMS Development
In the "JTable" class, the "publish" method by default uses the "published" column, as the column which identifies whether the item is published or not. Joomla 3 uses the "state" column for this purpose. So, why keep using "published" as a status column item?

Bakual

unread,
Dec 30, 2015, 3:50:11 PM12/30/15
to Joomla! CMS Development
It's not consistent across extensions.
com_content and com_banners use "state", languages, categories, modules, menues, newsfeed to name a few use "published".

Carlos Rodríguez

unread,
Dec 30, 2015, 4:26:27 PM12/30/15
to Joomla! CMS Development
Then, in a third party extension would have to use something like this 

$table->setColumnAlias('published', 'state');

It is correct?

Bomx

unread,
Dec 30, 2015, 7:12:34 PM12/30/15
to Joomla! CMS Development
As far as I remember published turned into 'state' which describes the state of an article. This is core specific change, as mentioned above you may call it current_state/whatever. 

In third party ext. you make your own tables and you manage them yourself, so you don't have to keep core standards. Threat component as single app - that's all - your own app. Just get as much as you can from built-in API and keep MVC so later you'll change less, or more:)

George Wilson

unread,
Dec 31, 2015, 11:19:20 PM12/31/15
to Joomla! CMS Development
Yup that's the recommended way to do it!

Kind Regards,
George

Carlos Rodríguez

unread,
Jan 4, 2016, 9:03:11 AM1/4/16
to Joomla! CMS Development
Thanks for the help.

Kind Regards,
Carlos
Reply all
Reply to author
Forward
0 new messages