XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
AdminBlockComments.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
17{
18 public function getName()
19 {
20 return 'block_comments';
21 }
22
23 public function getTitle()
24 {
25 return 'Comments';
26 }
27
28 public function getEntryIndex()
29 {
30 return 0;
31 }
32
33 public function isEnableCache()
34 {
35 return false;
36 }
37
38 public function execute()
39 {
40 $root =& XCube_Root::getSingleton();
41 $root->mLanguageManager->loadBlockMessageCatalog('legacy');
42
43 require_once XOOPS_ROOT_PATH . '/modules/legacy/blocks/legacy_comments.php';
44
45 $options = $_GET['options'] ?? [0];
46
47 $contents = b_legacy_comments_show($options);
48
49 $render =& $this->getRenderTarget();
50
51 // Load theme template ie fallback
52 $render->setTemplateName('legacy_admin_block_comments.html');
53
54 $render->setAttribute('legacy_module', 'legacy');
55
56 $render->setAttribute('contents', $contents);
57
58 $render->setAttribute('blockid', $this->getName());
59
60 $renderSystem =& $root->getRenderSystem($this->getRenderSystemName());
61
62 $renderSystem->renderBlock($render);
63 }
64
65 public function hasResult()
66 {
67 return true;
68 }
69
70 public function &getResult()
71 {
72 $dmy = 'dummy';
73 return $dmy;
74 }
75
76 public function getRenderSystemName()
77 {
78 return 'Legacy_AdminRenderSystem';
79 }
80}
81
82