1<?php 2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4include_once("./Services/Component/classes/class.ilPlugin.php"); 5 6/** 7 * Class ilCloudHookPlugin 8 * 9 * Definition of the PluginHook 10 * 11 * @author Timon Amstutz timon.amstutz@ilub.unibe.ch 12 * @version $Id$ 13 * @extends ilPlugin 14 * @ingroup ModulesCloud 15 */ 16abstract class ilCloudHookPlugin extends ilPlugin 17{ 18 19 /** 20 * Get Component Type 21 * 22 * @return string Component Type 23 */ 24 final public function getComponentType() 25 { 26 return IL_COMP_MODULE; 27 } 28 29 30 /** 31 * Get Component Name. 32 * 33 * @return string Component Name 34 */ 35 final public function getComponentName() 36 { 37 return "Cloud"; 38 } 39 40 41 /** 42 * Get Slot Name. 43 * 44 * @return string Slot Name 45 */ 46 final public function getSlot() 47 { 48 return "CloudHook"; 49 } 50 51 52 /** 53 * Get Slot ID. 54 * 55 * @return string Slot Id 56 */ 57 final public function getSlotId() 58 { 59 return "cldh"; 60 } 61 62 63 /** 64 * Object initialization done by slot. 65 */ 66 final protected function slotInit() 67 { 68 // nothing to do here 69 } 70 71 72 public function getPluginTablePrefix() 73 { 74 $id = $this->getId(); 75 if (!$id) { 76 $rec = ilPlugin::getPluginRecord($this->getComponentType(), $this->getComponentName(), $this->getSlotId(), $this->getPluginName()); 77 $id = $rec['plugin_id']; 78 } 79 80 return $this->getSlotObject()->getPrefix() . "_" . $id; 81 } 82 83 84 public function getPluginTableName() 85 { 86 return $this->getPluginTablePrefix() . "_props"; 87 } 88 89 90 public function getPluginConfigTableName() 91 { 92 return $this->getPluginTablePrefix() . "_config"; 93 } 94} 95