本文整理汇总了PHP中XoopsThemeForm::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsThemeForm::__construct方法的具体用法?PHP XoopsThemeForm::__construct怎么用?PHP XoopsThemeForm::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsThemeForm
的用法示例。
在下文中一共展示了XoopsThemeForm::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* form_room_type constructor.
* @param $RoomType
*/
public function __construct(&$RoomType)
{
$this->Obj =& $RoomType;
parent::__construct(_AM_MARTIN_HOTEL_ROOM_CATEGORY, "op", xoops_getenv('PHP_SELF') . "?action=typesave&typeid=" . $RoomType['room_type_id']);
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例2: __construct
/**
* form_hotel_service_type constructor.
* @param $HotelServiceTypeObj
*/
public function __construct(&$HotelServiceTypeObj)
{
$this->Obj =& $HotelServiceTypeObj;
parent::__construct(_AM_MARTIN_SERVICE_CATEGORY, "op", xoops_getenv('PHP_SELF') . "?action=typesave");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例3: __construct
/**
* form_hotel_city constructor.
* @param $HotelCityObj
*/
public function __construct(&$HotelCityObj)
{
$this->Obj =& $HotelCityObj;
parent::__construct(_AM_MARTIN_HOTEL_CITY, "op", xoops_getenv('PHP_SELF') . "?action=save");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例4: __construct
/**
* form_hotel_service constructor.
* @param $HotelServiceObj
* @param $TypeList
*/
public function __construct(&$HotelServiceObj, &$TypeList)
{
$this->Obj =& $HotelServiceObj;
$this->TypeList =& $TypeList;
parent::__construct(_AM_MARTIN_HOTEL_SERVICE, "op", xoops_getenv('PHP_SELF') . "?action=save");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例5: __construct
/**
* @param $target
*/
public function __construct(&$target)
{
$this->publisher =& PublisherPublisher::getInstance();
$this->targetObject =& $target;
parent::__construct(_AM_PUBLISHER_UPLOAD_FILE, 'form', xoops_getenv('PHP_SELF'));
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例6: __construct
/**
* form_room_price constructor.
* @param $RoomPriceObj
* @param $RoomList
*/
public function __construct(&$RoomPriceObj, &$RoomList)
{
$this->Obj =& $RoomPriceObj;
$this->RoomList =& $RoomList;
parent::__construct(_AM_MARTIN_HOTEL_ROOM_RATES, "op", xoops_getenv('PHP_SELF') . "?action=pricesave&room_id=" . @$RoomPriceObj['room_id'] . "&room_date=" . date('Y-m-d', @$RoomPriceObj['room_date']));
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例7: __construct
/**
* form_auction constructor.
* @param $AuctionObj
* @param $RoomList
* @param $HotelList
*/
public function __construct(&$AuctionObj, &$RoomList, &$HotelList)
{
$this->Obj =& $AuctionObj;
$this->RoomList =& $RoomList;
$this->HotelList =& $HotelList;
parent::__construct(_AM_MARTIN_HOTEL_BIDDING, "op", xoops_getenv('PHP_SELF') . "?action=save");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例8: __construct
/**
* form_hotel_service_relation constructor.
* @param $Relation
* @param $serviceList
* @param $hotelList
*/
public function __construct(&$Relation, &$serviceList, &$hotelList)
{
$this->Obj =& $Relation;
$this->serviceList =& $serviceList;
$this->hotelList =& $hotelList;
parent::__construct(_AM_MARTIN_HOTEL_ASSOCIATION, "op", xoops_getenv('PHP_SELF') . "?action=hotelsave&hotel_id={$Relation['hotel_id']}&service_id={$Relation['service_id']}");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例9: __construct
/**
* form_room constructor.
* @param $RoomObj
* @param $hotelList
* @param $TypeList
*/
public function __construct(&$RoomObj, &$hotelList, &$TypeList)
{
$this->Obj =& $RoomObj;
$this->hotelList =& $hotelList;
$this->TypeList =& $TypeList;
$this->RoomBedTypeList = getModuleArray('room_bed_type', 'order_type', true);
parent::__construct(_AM_MARTIN_HOTEL_ROOMS, "op", xoops_getenv('PHP_SELF') . "?action=save");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例10:
function __construct(&$target, $subCatsCount = 4)
{
$this->publisher = PublisherPublisher::getInstance();
$this->targetObject = $target;
$this->subCatsCount = $subCatsCount;
$member_handler = xoops_gethandler('member');
$this->userGroups = $member_handler->getGroupList();
parent::__construct(_AM_PUBLISHER_CATEGORY, "form", xoops_getenv('PHP_SELF'));
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例11: __construct
/**
* form_order constructor.
* @param $OrderObj
*/
public function __construct(&$OrderObj)
{
//array
$this->OrderType = getModuleArray('order_type', 'order_type', true);
$this->OrderMode = getModuleArray('order_mode', 'order_mode', true);
$this->OrderPayMethod = getModuleArray('order_pay_method', 'order_pay_method', true);
$this->OrderStatus = getModuleArray('order_status', 'order_status', true);
$this->OrderDocumentType = getModuleArray('order_document_type', 'order_document_type', true);
//print_r($this->OrderStatus);exit;
$this->Obj =& $OrderObj;
parent::__construct(_AM_MARTIN_ORDER_INFORMATION, "op", xoops_getenv('PHP_SELF') . "?action=save");
$this->setExtra('enctype="multipart/form-data"');
$this->createElements();
$this->createButtons();
}
示例12: alumni_getSearchFrom
public function alumni_getSearchFrom($andor, $queries, $mids, $mid, $bycat)
{
$xoops = Xoops::getInstance();
$alumni = Alumni::getInstance();
// create form
parent::__construct(XoopsLocale::SEARCH, 'alumni', 'search.php', 'get');
// create form elements
$this->addElement(new XoopsFormText(XoopsLocale::KEYWORDS, 'query', 30, 255, htmlspecialchars(stripslashes(implode(' ', $queries)), ENT_QUOTES)), true);
$type_select = new XoopsFormSelect(XoopsLocale::TYPE, 'andor', $andor);
$type_select->addOptionArray(array('AND' => XoopsLocale::ALL_AND, 'OR' => XoopsLocale::ANY_OR, 'exact' => XoopsLocale::EXACT_MATCH));
$this->addElement($type_select);
$by_cat = Request::getInt('by_cat', 0);
$categoriesHandler = $xoops->getModuleHandler('category', 'alumni');
$search = Search::getInstance();
$module_id = $xoops->module->getVar('mid');
$groups = $xoops->isUser() ? $xoops->user->getGroups() : '3';
$alumni_ids = $alumni->getGrouppermHandler()->getItemIds('alumni_view', $groups, $module_id);
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('cid', '(' . implode(', ', $alumni_ids) . ')', 'IN'));
$criteria->setOrder($xoops->getModuleConfig('alumni_csortorder'));
$category_arr = $categoriesHandler->getall($criteria);
foreach (array_keys($category_arr) as $i) {
$cid = $category_arr[$i]->getVar('cid');
$pid = $category_arr[$i]->getVar('pid');
$title = $category_arr[$i]->getVar('title');
}
$categories = $alumni->getCategoryHandler()->getCategoriesForSearch();
$category_select = new XoopsFormSelect(AlumniLocale::L_ALUMNI_CATEGORIES, 'by_cat', $by_cat);
foreach ($categories as $cid => $title) {
$category_select->addOption('0', XoopsLocale::ALL);
$category_select->addOptionArray(array($cid => $title));
}
$this->addElement($category_select);
if (!empty($mids)) {
$mods_checkbox = new XoopsFormCheckBox(XoopsLocale::SEARCH_IN, 'mids[]', $mids);
} else {
$mods_checkbox = new XoopsFormCheckBox(XoopsLocale::SEARCH_IN, 'mids[]', $mid);
}
if (empty($modules)) {
$gperm_handler = $xoops->getHandlerGroupPermission();
$available_modules = $gperm_handler->getItemIds('module_read', $xoops->getUserGroups());
$available_plugins = Xoops\Module\Plugin::getPlugins('search');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('dirname', '(\'' . implode('\',\'', array_keys($available_plugins)) . '\')', 'IN'));
if (isset($available_modules) && !empty($available_modules)) {
$criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN'));
}
$module_handler = $xoops->getHandlerModule();
$mods_checkbox->addOptionArray($module_handler->getNameList($criteria));
} else {
/* @var $module XoopsModule */
$module_array = array();
foreach ($modules as $mid => $module) {
$module_array[$mid] = $module->getVar('name');
}
$mods_checkbox->addOptionArray($module_array);
}
$this->addElement($mods_checkbox);
if ($search->getConfig('keyword_min') > 0) {
$this->addElement(new XoopsFormLabel(XoopsLocale::SEARCH_RULE, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $search->getConfig('keyword_min'))));
}
$this->addElement(new XoopsFormHidden('action', 'results'));
$this->addElement(new XoopsFormHiddenToken('id'));
$this->addElement(new XoopsFormButton('', 'submit', XoopsLocale::SEARCH, 'submit'));
return $this;
}