XoopsModules25x/tools

View on GitHub
modules/tools/class/XoopsBlock.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace XoopsModules\Tools;

use XoopsObject;

/**
 * tools Module for XOOPS
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       XOOPS Project (https://xoops.org)
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         tools
 * @since           2.00
 * @author          Susheng Yang <ezskyyoung@gmail.com>
 */
class XoopsBlock extends XoopsObject
{
    public function __construct()
    {
        $this->initVar('bid', XOBJ_DTYPE_INT);
        $this->initVar('mid', XOBJ_DTYPE_INT, 0);
        $this->initVar('func_num', XOBJ_DTYPE_INT, 0);
        $this->initVar('options', XOBJ_DTYPE_TXTBOX, null, false, 255);
        $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
        //$this->initVar('position', XOBJ_DTYPE_INT, 0, false);
        $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 150);
        $this->initVar('content', XOBJ_DTYPE_TXTAREA);
        $this->initVar('side', XOBJ_DTYPE_INT, 0);
        $this->initVar('weight', XOBJ_DTYPE_INT, 0);
        $this->initVar('visible', XOBJ_DTYPE_INT, 0);
        // The block_type is in a mess, let's say:
        // S - generated by system module
        // M - generated by a non-system module
        // C - Custom block
        // D - cloned system/module block
        // E - cloned custom block, DON'T use it
        $this->initVar('block_type', XOBJ_DTYPE_OTHER);
        $this->initVar('c_type', XOBJ_DTYPE_OTHER);
        $this->initVar('isactive', XOBJ_DTYPE_INT);

        $this->initVar('dirname', XOBJ_DTYPE_TXTBOX, null, false, 50);
        $this->initVar('func_file', XOBJ_DTYPE_TXTBOX, null, false, 50);
        $this->initVar('show_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
        $this->initVar('edit_func', XOBJ_DTYPE_TXTBOX, null, false, 50);

        $this->initVar('template', XOBJ_DTYPE_OTHER);
        $this->initVar('bcachetime', XOBJ_DTYPE_INT, 0);
        $this->initVar('last_modified', XOBJ_DTYPE_INT, 0);
    }
}