srgg6701
srgg6701

Reputation: 2048

Can't understand which subpackage for JModel is for 2.5x

I can't find a real subpackage for an abstract class JModel (platform 12.1: http://api.joomla.org/Joomla-Platform/Application/JModel.html). There is pointed:

Class JObject   (Subpackage Base)
   Abstract class JModel   (Subpackage Application)

I don't see it in a packages tree. I don't see Base->JObject, nor Application->JModel, nor Object -> JObject -> JModel. I literally have no any idea where it can be found...

Upvotes: 2

Views: 513

Answers (2)

Elin
Elin

Reputation: 6755

In 2.5 you should use the JLegacyModel class which Valentin mentioned. The base JModel class is in the legacy folder while the subclasses are in the cms folder. This will let you switch to J3 when you want.

libraries/legacy/model/model.php

Upvotes: 1

Valentin Despa
Valentin Despa

Reputation: 42582

You can extend JModel in your class, as well as JModelList, JModelItem, JModelForm etc.

It really depends on what you want to do.

The actual implementation can be found under:

libraries/joomla/application/component/model.php or modeladmin.php etc.

Upvotes: 1

Related Questions