/class.xmodblogwd.inc
PHP | 52 lines | 46 code | 5 blank | 1 comment | 0 complexity | cfc65dd85505ef1d3ec499f3ad103315 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, GPL-3.0, Apache-2.0, BSD-3-Clause
- <?php
- /// Wizard de creation d'un module de gestion de blog
- class XModBlogWd extends XModTableWd {
- function __construct($ar=NULL) {
- parent::__construct($ar);
- XLabels::loadLabels('xmodblog');
- }
- function istep1() {
- XModuleWd::istep1();
- $this->createStructure();
- }
- function iend($ar=NULL) {
- parent::iend();
- }
- private function createStructure() {
- $newtable=XDSTable::newTableNumber();
- $cmdtable=$newtable;
- $lg = TZR_DEFAULT_LANG;
- $ar1=array();
- $ar1["translatable"]="1";
- $ar1["publish"]="1";
- $ar1["auto_translate"]="0";
- $ar1["btab"]=$newtable;
- $ar1["bname"][$lg]="Blog - Messages";
- XDSTable::procNewSource($ar1);
- $x=XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.$newtable);
- $x->createField('dtype', 'Type', // ord obl que bro tra mul pub tar
- 'XShortTextDef', '20','3','1','1','1','0','0','1');
- $x->createField('title',
- XLabels::getSysLabel('general','title','text'), // ord obl que bro tra mul pub tar
- 'XShortTextDef', '100','4','1','1','1','0','0','1');
- $x->createField('txt', // ord obl que bro tra mul pub tar
- XLabels::getSysLabel('xmodblog.paper'),'XRichTextDef', '60','5','1','1','1','0','0','0');
- $x->createField('afile', // ord obl que bro tra mul pub tar
- XLabels::getSysLabel('xmodblog.file'),'XFileDef', '','6','1','1','1','0','0','0');
- $x->createField('paperup', // ord obl que bro tra mul pub tar
- XLabels::getSysLabel('xmodblog.paperup'),'XLinkDef', '60','7','0','1','1','0','0','0',$newtable);
- $x->createField('blog', // ord obl que bro tra mul pub tar
- 'Blog','XLinkDef', '60','8','0','1','1','0','0','0',$newtable);
- $x->createField('who', // ord obl que bro tra mul pub tar
- 'Who','XUrlDef', '200','9','0','1','0','0','0','0');
- $x->createField('datep', // ord obl que bro tra mul pub tar
- 'Date','XDateTimeDef', '20','10','0','0','0','0','0','0');
- $this->_module->table=$newtable;
- }
- }
- ?>