XOOPS  2.6.0
menus_menus.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
24 {
28  public function __construct(MenusMenus &$obj)
29  {
31 
32  $title = $obj->isNew() ? sprintf(_AM_MENUS_ADD_MENUS) : sprintf(_AM_MENUS_EDIT_MENUS);
33 
34  parent::__construct($title, 'form', 'admin_menus.php', 'post', true);
35 
36  //title
37  $this->addElement(new Xoops\Form\Text(_AM_MENUS_MENU_TITLE, 'title', 50, 255, $obj->getVar('title'), ''), true);
38 
39  $this->addElement(new Xoops\Form\Hidden('id', $obj->getVar('id')));
40  $this->addElement(new Xoops\Form\Hidden('op', 'save'));
41  $this->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
42  }
43 }
const A_SUBMIT
Definition: en_US.php:128
static getInstance()
Definition: Xoops.php:160
addElement(Element $formElement, $required=false)
Definition: Form.php:206
const _AM_MENUS_ADD_MENUS
Definition: admin.php:20
getVar($key, $format= 's')
$xoops
Definition: admin.php:25
const _AM_MENUS_MENU_TITLE
Definition: admin.php:6
const _AM_MENUS_EDIT_MENUS
Definition: admin.php:22
__construct(MenusMenus &$obj)
Definition: menus_menus.php:28