17 public $mModule =
null;
25 public $mBmodule = [];
27 public $mColumn =
null;
29 public $mCachetime =
null;
31 public function LegacyNewblocksObject()
36 public function __construct()
39 if (isset($initVars)) {
40 $this->mVars = $initVars;
43 $this->initVar(
'bid', XOBJ_DTYPE_INT,
'0',
true);
44 $this->initVar(
'mid', XOBJ_DTYPE_INT,
'0',
true);
45 $this->initVar(
'func_num', XOBJ_DTYPE_INT,
'0',
true);
46 $this->initVar(
'options', XOBJ_DTYPE_STRING,
'',
true, 191);
47 $this->initVar(
'name', XOBJ_DTYPE_STRING,
'',
true, 150);
48 $this->initVar(
'title', XOBJ_DTYPE_STRING,
'',
true, 191);
49 $this->initVar(
'content', XOBJ_DTYPE_TEXT,
'',
true);
50 $this->initVar(
'side', XOBJ_DTYPE_INT,
'0',
true);
51 $this->initVar(
'weight', XOBJ_DTYPE_INT,
'0',
true);
52 $this->initVar(
'visible', XOBJ_DTYPE_BOOL,
'0',
true);
53 $this->initVar(
'block_type', XOBJ_DTYPE_STRING,
'',
true, 1);
54 $this->initVar(
'c_type', XOBJ_DTYPE_STRING,
'',
true, 1);
55 $this->initVar(
'isactive', XOBJ_DTYPE_BOOL,
'0',
true);
56 $this->initVar(
'dirname', XOBJ_DTYPE_STRING,
'',
true, 50);
57 $this->initVar(
'func_file', XOBJ_DTYPE_STRING,
'',
true, 50);
58 $this->initVar(
'show_func', XOBJ_DTYPE_STRING,
'',
true, 50);
59 $this->initVar(
'edit_func', XOBJ_DTYPE_STRING,
'',
true, 50);
60 $this->initVar(
'template', XOBJ_DTYPE_STRING,
'',
true, 50);
61 $this->initVar(
'bcachetime', XOBJ_DTYPE_INT,
'0',
true);
62 $this->initVar(
'last_modified', XOBJ_DTYPE_INT, time(),
true);
63 $initVars = $this->mVars;
66 public function loadModule()
68 $handler =& xoops_gethandler(
'module');
69 $this->mModule =& $handler->get($this->
get(
'mid'));
79 $handler =& xoops_gethandler(
'groupperm');
81 $criteria->add(
new Criteria(
'gperm_modid', 1));
82 $criteria->add(
new Criteria(
'gperm_itemid', $this->
get(
'bid')));
83 $criteria->add(
new Criteria(
'gperm_name',
'block_read'));
85 $gpermArr =& $handler->getObjects($criteria);
87 $handler =& xoops_gethandler(
'group');
88 foreach ($gpermArr as $gperm) {
89 $this->mGroup[] =& $handler->get($gperm->get(
'gperm_groupid'));
93 public function loadBmodule()
95 $handler =& xoops_getmodulehandler(
'block_module_link',
'legacy');
96 $criteria =
new Criteria(
'block_id', $this->
get(
'bid'));
98 $this->mBmodule =& $handler->getObjects($criteria);
101 public function loadColumn()
103 $handler =& xoops_getmodulehandler(
'columnside',
'legacy');
104 $this->mColumn =& $handler->get($this->
get(
'side'));
107 public function loadCachetime()
109 $handler =& xoops_gethandler(
'cachetime');
110 $this->mCachetime =& $handler->get($this->
get(
'bcachetime'));