Site generator is used to build controller units (modules) for a specific site. The generator will build the controller, model, view and a default template view. Additionally systemDaoInterface classnames can be provided and a skeleton interface / controller setup created tailored for that class.
Again a site is required to be able to use the generator, and similar to the class generator, each site can have its own set of templates.
To define custom templates, they must be located in /data/templates/mvcGenerator and be prefixed with the site domain name. If no file exists, the default site (base) is used instead. base and baseAdminSite are reserved for the main base components.
For DAO objects, the templates must be named site_domain_name.dao.
With all templates configured a new component can be generated. This will build a controller, model and view and if a DAO has been specified will pre-populate most of the properties and view information for the DAO object. Reflection is used to find the object properties.
For other requests the basic templates are used. These basic templates are normally your sites default page layout and includes.
Smarty is used to render the components, so any valid smarty code or plugins can be used to build mvc components.
public buildControllerData($inControllerName)
Adds the controller data to the generator
public getSiteID()
Return SiteID
public setSiteID($inSiteID)
Set $_SiteID to $inSiteID
public getSite()
Returns the site object
public setSite($inSite)
Sets the mvcSiteTools site object
public getDaoObject()
Returns the systemDaoInterface name to use during generation
public setDaoObject($inDaoObject)
Set $_DaoObject to $inDaoObject
Posted by: Scorpio Documentor (Writer), in Generator on 19 Nov 2009 @ 20:30
Tags: generator, generatorbase, generatorcontroller,
This
work is licenced under a
Creative Commons Licence.