en:dev:controllers:backend:model
Using a model in the Control panel
Up to InstantCMS version 2.3.0 inclusively, the Control panel does not automatically link its own model, unlike the frontend. For this reason, it needs to be manually linked in the backend controller, if necessary:
In any controller’s method:
$model = cmsCore::getModel($this->name);
Or in the class constructor:
$this->model = cmsCore::getModel($this->name);
And then use the object in the controller’s method.
In InstantCMS version 2.3.0 and higher, the $this→model model object is automatically available in the backend controller, if there is a model.
en/dev/controllers/backend/model.txt · Последнее изменение: 27.04.2017 16:45 — murlysja