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