Open Source Content Management Framework

MidCOM component development

  1. MidCOM component basics
  2. Quick start
  3. Component interface classes
  4. Advanced component development
  5. Development tools

MidCOM components are object-oriented PHP applications that can be run anywhere on a Midgard CMS powered website or application. The MidCOM framework provides centralized services like internationalization, configuration and output templating for the components.

The components must provide some defined interface classes that MidCOM utilizes to place the component seamlessly into the site.

This guide aims to help developers with existing PHP skills to port or develop new applications as part of the MidCOM framework.

MidCOM component basics

Quick start

To make it easy to contribute your component into MidCOM's Subversion repository you should run MidCOM from Subversion. This setup will also provide you with the phing tool that can be used to generate a running skeleton for your component.

To generate the skeleton, go to the trunk directory of your Subversion checkout and run:

$ phing scaffold -Dmodule=net.nemein.calendar

This would generate a basic component into directory src/net.nemein.calendar that you can then start to edit.

To get the component run in your Midgard installation you have to symlink the component directory under the actual executed MidCOM tree, either by running phing install or by manually linking:

$ ln -s /home/bergie/devel/trunk/src/net.nemein.calendar /usr/local/lib/midcom/lib/net/nemein/calendar

Then just call the /midcom-cache-invalidate on your site to get the component manifest loaded and the component should appear in folder creation screen.

Component interface classes

Advanced component development

Development tools

Designed by Nemein, hosted by Anykey