PageRenderTime 52ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/class.xmodblogwd.inc

https://github.com/jcplat/console-seolan
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
  1. <?php
  2. /// Wizard de creation d'un module de gestion de blog
  3. class XModBlogWd extends XModTableWd {
  4. function __construct($ar=NULL) {
  5. parent::__construct($ar);
  6. XLabels::loadLabels('xmodblog');
  7. }
  8. function istep1() {
  9. XModuleWd::istep1();
  10. $this->createStructure();
  11. }
  12. function iend($ar=NULL) {
  13. parent::iend();
  14. }
  15. private function createStructure() {
  16. $newtable=XDSTable::newTableNumber();
  17. $cmdtable=$newtable;
  18. $lg = TZR_DEFAULT_LANG;
  19. $ar1=array();
  20. $ar1["translatable"]="1";
  21. $ar1["publish"]="1";
  22. $ar1["auto_translate"]="0";
  23. $ar1["btab"]=$newtable;
  24. $ar1["bname"][$lg]="Blog - Messages";
  25. XDSTable::procNewSource($ar1);
  26. $x=XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.$newtable);
  27. $x->createField('dtype', 'Type', // ord obl que bro tra mul pub tar
  28. 'XShortTextDef', '20','3','1','1','1','0','0','1');
  29. $x->createField('title',
  30. XLabels::getSysLabel('general','title','text'), // ord obl que bro tra mul pub tar
  31. 'XShortTextDef', '100','4','1','1','1','0','0','1');
  32. $x->createField('txt', // ord obl que bro tra mul pub tar
  33. XLabels::getSysLabel('xmodblog.paper'),'XRichTextDef', '60','5','1','1','1','0','0','0');
  34. $x->createField('afile', // ord obl que bro tra mul pub tar
  35. XLabels::getSysLabel('xmodblog.file'),'XFileDef', '','6','1','1','1','0','0','0');
  36. $x->createField('paperup', // ord obl que bro tra mul pub tar
  37. XLabels::getSysLabel('xmodblog.paperup'),'XLinkDef', '60','7','0','1','1','0','0','0',$newtable);
  38. $x->createField('blog', // ord obl que bro tra mul pub tar
  39. 'Blog','XLinkDef', '60','8','0','1','1','0','0','0',$newtable);
  40. $x->createField('who', // ord obl que bro tra mul pub tar
  41. 'Who','XUrlDef', '200','9','0','1','0','0','0','0');
  42. $x->createField('datep', // ord obl que bro tra mul pub tar
  43. 'Date','XDateTimeDef', '20','10','0','0','0','0','0','0');
  44. $this->_module->table=$newtable;
  45. }
  46. }
  47. ?>