This is a single unit of content, stored in a single database record/row. Different subclasses of the Objekt class handle specific content types ( eg. WikiPage, Event ).

Each one specifies InputObjects for each of its fields (eg. title, price of admission, sexual preference).

All of the Objekts are stored in the same table: "objekt_objekt".

Some of the fields are natural database fields (eg. the ones that are generic to all content: title, online, authorID) and some are in the "data" fields : the InputObjects store their (possibly multidimensional) data into the object's data array which is then archived and stored in the database field 'data'. The simpler formfield InputObjects are blissfully unaware if they are updating/inserting to a normal database field or to a 'data' field. The more complex ones may store many things into data or even may opt to store data in other db tables, files, RDF transactions, whatever.

Standard Functions

getInputs()

This function handles creating the InputObjects for the objekt. You need to be aware that there are four functions to getInputs - getInputsForDisplay, getInputsForInsert, getInputsForUpdate and getInputsForSummarize. Most reasonable classes all call getInputs(). But some do some unecessarily wacky things. What we really should do is call getInputs() with a flag to know where we're calling from and let it have all the inputs and handle the logic for the different calls. If you think you've added an input and it's not showing up, you probably didn't add it to all the getInput functions.

Natural Database Fields

 objektID

 class  The lowercase name of the Objekt subclass. All classnames of Objekt subclasses and the filenames should be in lowercase to support autoloading of the classfile.

 species The species can be used to group different classes into behavior groups. Examples are 'layout', 'menu' and 'feed'.

title  summary The text summary can be set here, though the Objekt's summarize() method may be used to avoid filling this out. By default summarize() formats and displays the summary field.

data  The archived data object.

createdOnSite  The SITE_KEY as defined in the site's Application.php

authorID groupAuthorID  Groups are not yet implemented, but this field is to support group authorship for Wikis, Calendars etc.

sections  I would prefer to have done sections with the more flexible attribute system, but wasn't able to solve that completely enough in time for installation. So I just added a section field. I would like to remove this as it is an assumption about site structure that isn't universal.

contentStartTime  contentEndTime  This is a real world start and end time that the content might be relevant for. eg. an event/gig/meeting/conference. Location will be added later. see also Dates and Times

online  is it okay to show this online. boolean (0/1)

publishStart  publishEnd  This is when the content is allowed to be shown online. View functions should limit their selection by this. see also Dates and Times

createdOn  lastModified  These are automatically set when the object is created and whenever it is modified. Modified by will be supported by tracking. see also Dates and Times

moddate depreciated. soon to be removed

userfield1  userfield2  userfield3 Objekt classes may use these for storage when they wish to easily be able to search or sort by those fields. They are all strings.

hits  This will be removed once the tracking system is installed. Its too simple; copied from xoops.

lockTime  lockIP  Not yet implemented, but this will support locking an object for editing (for group authorship or nosey admins who keep screwing with the users).


see also Loading Objekts