1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31:
32:
33:
34: interface projectCalendarImpl {
35:
36: function initialize(&$mainhandler);
37: function getPluginAppId();
38: function enableObject($enable = true);
39: function getPosition();
40: function getAppMainViewItem();
41: function registerAppMenuHandler(&$obj);
42: function setAppMainView(&$pagewrap,&$apphandler,&$baseui,$db,$params_arr);
43: function setSideView(&$pagewrap,&$apphandler,&$baseui,$db,$params_arr);
44: }
45:
46: class projectCalendar implements projectCalendarImpl {
47:
48: private $PLUGIN_APP_ID = PROJECT_APP;
49: private $instance;
50: private $handlers;
51: private $enabled;
52: private $menuhandler;
53: public function __construct (){
54: $this->instance = $this;
55: $this->enabled = true;
56: $this->handler = 'project';
57: $this->handlers = array('project','project_task_board');
58: $this->position = 'right';
59: $this->appview = 'project_calendar';
60: }
61:
62: public function initialize(&$mainhandler){
63: $mainhandler->viewhandler->addOperationsAction('calendar_event','javascript:bmm_erp_project_calendar.get_project_calendar','calendar_event',$mainhandler,'getProjectId',$this->handlers);
64:
65: }
66:
67: public function getPluginAppId(){
68: return $this->PLUGIN_APP_ID;
69: }
70:
71: public function getPluginHandler(){
72: return $this->handlers;
73: }
74:
75: public function enableObject($enable = true){
76: $this->enabled = $enable;
77: }
78:
79: public function getObjectStatus(){
80: return $this->enabled;
81: }
82:
83: public function getPosition(){
84: return $this->position;
85: }
86:
87: public function getAppMainViewItem(){
88: return $this->appview;
89: }
90:
91: public function registerAppMenuHandler(&$obj){
92:
93:
94: }
95:
96: public function setAppMainView(&$pagewrap,&$mainhandler,&$baseui,$db,$params_arr){
97: }
98:
99: public function setSideView(&$pagewrap,&$apphandler,&$baseui,$db,$params_arr){
100: echo "
101: <script type=\"text/javascript\">
102: //bmm_erp_project_calendar.get_project_calendar();
103: </script>";
104:
105: }
106: }?>
107: