PHP Classes
elePHPant
Icontem

Joomla MVC Classes: Base MVC classes for developing Joomla extension

Recommend this page to a friend!
  Info   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-02-19 (6 years ago) RSS 2.0 feedStarStarStar 53%Total: 991 All time: 3,534 This week: 963Up
Version License PHP version Categories
joomla-mvc-lesd 1.0GNU General Publi...4.0PHP 5, Libraries, Content management, D...
Description Author

This package provides base classes for developing Joomla extension using the MVC design pattern.

It provides base model, view and controller classes wrap around Joomla base code.

The base MVC classes should be extended to implement new Joomla extensions.

Picture of Luis Dias
Name: Luis Dias <contact>
Classes: 1 package by
Country: Portugal Portugal

Details
Joomla! MVC Classes for Backend Development

1. Goal:

Provide base classes for model, view and controller helping joomla backend development.

2. How to use:

During backend development prepare the folder strucuture in this way:
controllers
libs
models
tables
views

Place the 3 files (jmodellesd.php, jviewlesd.php and jcontrollerlesd.php) 
inside the "libs" folder.

Create your MVC classes extending the classes JModelLesd, JViewLesd and 
JControllerLesd instead of Joomla! base classes.

--------------------------------------------------------------------------------
About the JModelLesd class:

You need to set the $_filter_field property with the name of the field for 

Example of model class:
<?php
defined('_JEXEC') or die();
require_once( JPATH_COMPONENT.DS.'libs'.DS.'jmodellesd'.'.php' );
class MyextensionModelExamples extends JModelLesd
{
	function __construct()
	{
     parent::__construct();
	 $this->_filter_field = 'name';
	}
}
?>
--------------------------------------------------------------------------------
About the JViewLesd class:

The class work with 2 templates: 
default.php - for presenting the data grid with pagination, order and filter fields  
form.php - form for edit or add records 
( see the example files )

Example of View Class:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'libs'.DS.'jviewlesd'.'.php' );
class MyextensionViewExamples extends JViewLesd	{
}
?>
--------------------------------------------------------------------------------
About the JControllerLesd class:

Example of controller class:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'libs'.DS.'jcontrollerlesd'.'.php' );
class MyextensionControllerExamples extends JControllerLesd {
}
?>

Notes:

There is no controller outside the "controllers" folder. 
The entry point (hello.php) of the extension handle the default controller.

Enjoy

Luis Eduardo
luis.edudias@gmail.com
  Files folder image Files  
File Role Description
Files folder imageexample (1 file, 1 directory)
Accessible without login Plain text file COPYING.txt Lic. GNU GENERAL PUBLIC LICENSE
Plain text file jcontrollerlesd.php Class Joomla Controller Class
Plain text file jmodellesd.php Class Joomla Model Class
Plain text file jviewlesd.php Class Joomla View Class
Accessible without login Plain text file README.txt Doc. Documentation

  Files folder image Files  /  example  
File Role Description
Files folder imageadmin (2 files, 5 directories)
  Accessible without login Plain text file hellos.xml Data Extension XML file

  Files folder image Files  /  example  /  admin  
File Role Description
Files folder imagecontrollers (1 file)
Files folder imagelibs (3 files)
Files folder imagemodels (1 file)
Files folder imagetables (1 file)
Files folder imageviews (1 directory)
  Accessible without login Plain text file hellos.php Example Entry point
  Accessible without login Plain text file index.html Example null index.html

  Files folder image Files  /  example  /  admin  /  controllers  
File Role Description
  Plain text file hellos.php Class Hellos Controller

  Files folder image Files  /  example  /  admin  /  libs  
File Role Description
  Plain text file jcontrollerlesd.php Class Lesd Controller Class
  Plain text file jmodellesd.php Class Lesd Model Class
  Plain text file jviewlesd.php Class Lesd View Class

  Files folder image Files  /  example  /  admin  /  models  
File Role Description
  Plain text file hellos.php Class Hellos Model

  Files folder image Files  /  example  /  admin  /  tables  
File Role Description
  Plain text file hellos.php Class Hellos Table Class

  Files folder image Files  /  example  /  admin  /  views  
File Role Description
Files folder imagehellos (1 file, 1 directory)

  Files folder image Files  /  example  /  admin  /  views  /  hellos  
File Role Description
Files folder imagetmpl (2 files)
  Plain text file view.html.php Class Hellos View Class

  Files folder image Files  /  example  /  admin  /  views  /  hellos  /  tmpl  
File Role Description
  Accessible without login Plain text file default.php Aux. Hellos Default Template
  Accessible without login Plain text file form.php Example Hellos Form Template

 Version Control Unique User Downloads Download Rankings  
 0%
Total:991
This week:0
All time:3,534
This week:963Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:50%StarStarStar
Documentation:50%StarStarStar
Examples:56%StarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:1817