All pastes #94846 Raw Edit

Untitled

public text v1 · immutable
#94846 ·published 2006-07-21 15:55 UTC
rendered paste body
<?php

class Diary extends Module
{
	function Diary()
	{
		$this->navElements= array('List'=>'List Entries','Add'=>'AddEntry');
		$this->navName="Diary";
		$this->className="Diary";
		$this->priority = 80;		
	}
	
	function makeForm()
	{
		$form = new Form();
		$form->addDatePicker('diaryDate');
		$form->addTextArea('content');
		$form->addHidden('diaryid');	
		return $form;
	}

	function executeList()
	{
		$this->listHelper('SimpleDiary');
	}

	function executeAdd()
	{
		$this->addHelper('SimpleDiary');
	}

	function executeEdit()
	{
		$this->editHelper('SimpleDiary');
	}

	function executeDelete()
	{
		$this->deleteHelper('SimpleDiary');
	}

}

$_SERVER['moduleRegistry']->registerModule('Diary');


?>