Completed
Push — master ( 2f6fab...c5b9c9 )
by Goffy
11s queued 10s
created

XoopsBlock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 32 1
1
<?php
2
3
namespace XoopsModules\Tools;
4
5
use XoopsObject;
6
7
/**
8
 * tools Module for XOOPS
9
 *
10
 * You may not change or alter any portion of this comment or credits
11
 * of supporting developers from this source code or any supporting source code
12
 * which is considered copyrighted (c) material of the original comment or credit authors.
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
 *
17
 * @copyright       XOOPS Project (https://xoops.org)
18
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
19
 * @package         tools
20
 * @since           2.00
21
 * @author          Susheng Yang <[email protected]>
22
 */
23
class XoopsBlock extends XoopsObject
24
{
25
    public function __construct()
26
    {
27
        $this->initVar('bid', XOBJ_DTYPE_INT);
28
        $this->initVar('mid', XOBJ_DTYPE_INT, 0);
29
        $this->initVar('func_num', XOBJ_DTYPE_INT, 0);
30
        $this->initVar('options', XOBJ_DTYPE_TXTBOX, null, false, 255);
31
        $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
32
        //$this->initVar('position', XOBJ_DTYPE_INT, 0, false);
33
        $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 150);
34
        $this->initVar('content', XOBJ_DTYPE_TXTAREA);
35
        $this->initVar('side', XOBJ_DTYPE_INT, 0);
36
        $this->initVar('weight', XOBJ_DTYPE_INT, 0);
37
        $this->initVar('visible', XOBJ_DTYPE_INT, 0);
38
        // The block_type is in a mess, let's say:
39
        // S - generated by system module
40
        // M - generated by a non-system module
41
        // C - Custom block
42
        // D - cloned system/module block
43
        // E - cloned custom block, DON'T use it
44
        $this->initVar('block_type', XOBJ_DTYPE_OTHER);
45
        $this->initVar('c_type', XOBJ_DTYPE_OTHER);
46
        $this->initVar('isactive', XOBJ_DTYPE_INT);
47
48
        $this->initVar('dirname', XOBJ_DTYPE_TXTBOX, null, false, 50);
49
        $this->initVar('func_file', XOBJ_DTYPE_TXTBOX, null, false, 50);
50
        $this->initVar('show_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
51
        $this->initVar('edit_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
52
53
        $this->initVar('template', XOBJ_DTYPE_OTHER);
54
        $this->initVar('bcachetime', XOBJ_DTYPE_INT, 0);
55
        $this->initVar('last_modified', XOBJ_DTYPE_INT, 0);
56
    }
57
}
58