Admin models are located in the
/mvc/admin/models/ directory and must extend the
MVC_Admin_General class. The class name should be prefixed with
MVC_Admin_ and the filename should be the class name in lowercase with an extension of
.class.php. For example, with a portfolio model, the class name could be
MVC_Admin_Portfolio with a filename of
mvc_admin_portfolio.class.php. If desired, models can be organised into sub-directories.
All admin models must implement the following public methods;
actions_fn: Registers all action hooks. Should hook
filters_fn: Registers all filter hooks
enqeue_fn: Registers/enqueues all CSS and JS files
to_submenu_fn: Registers an admin page
interface_fn: Outputs the content of the admin page
Whilst not required it is also recommended to implement
menu_link_fn to add an item to the Simpods settings menu.
All admin models must define the following public properties;
$order_int: The order of the link created by
menu_link_fnin the menu
A minimal template is located in the
/mvc/models/mvc_front_sample.class.php file. Note that this file will be loaded; to avoid errors remember to name your model class before saving a new file.