1: <?php
2: /**
3: * This file contains the abstract frontend logic class.
4: *
5: * @package Plugin
6: * @subpackage FrontendLogic
7: * @version SVN Revision $Rev:$
8: *
9: * @author Unknown
10: * @copyright four for business AG <www.4fb.de>
11: * @license http://www.contenido.org/license/LIZENZ.txt
12: * @link http://www.4fb.de
13: * @link http://www.contenido.org
14: */
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: /**
19: * FrontendLogic: This is the base class for all frontend related logic.
20: *
21: * Basically, the class FrontendLogic is the base class for all your objects in
22: * the frontend. Your child classes define how your objects are named, which
23: * actions and items they contain and which item type they've got.
24: *
25: * A word on actions: Each single object of a FrontendLogic subclass has the
26: * same amount of actions. You can't have a different set of actions for
27: * different objects of the same type.
28: *
29: * @package Plugin
30: * @subpackage FrontendLogic
31: */
32: abstract class FrontendLogic {
33:
34: /**
35: * getFriendlyName: Returns the friendly (e.g. display) name of your
36: * objects.
37: *
38: * @return string
39: * Name of the object
40: */
41: public function getFriendlyName() {
42: return "Inherited class *must* override getFriendlyName";
43: }
44:
45: /**
46: * listActions: Lists all actions
47: *
48: * The returned array has the format $actionname => $actiondescription
49: *
50: * @return array
51: * Array of all actions
52: */
53: public function listActions() {
54: return array("Inherited class *must* override listActions");
55: }
56:
57: /**
58: * listItems: Lists all available items
59: *
60: * The returned array has the format $itemid => $itemname
61: *
62: * @return array
63: * Array of items
64: */
65: public function listItems() {
66: return array("Inherited class *must* override listItems");
67: }
68:
69: }
70: