本文整理匯總了PHP中AttributeGroup::loadData方法的典型用法代碼示例。如果您正苦於以下問題:PHP AttributeGroup::loadData方法的具體用法?PHP AttributeGroup::loadData怎麽用?PHP AttributeGroup::loadData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AttributeGroup
的用法示例。
在下文中一共展示了AttributeGroup::loadData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UIAdminBreadcrumb
$obj->copyFromPost();
$obj->update();
}
if (is_array($obj->_errors) and count($obj->_errors) > 0) {
$errors = $obj->_errors;
} else {
UIAdminAlerts::conf('已更新屬性組');
}
}
if (isset($errors)) {
UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '屬性組', 'href' => 'index.php?rule=attribute_group'));
$breadcrumb->add(array('title' => '編輯', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=attribute_group', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-attribute-group', 'class' => 'btn-success', 'icon' => 'saved'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
?>
<script language="javascript">
$("#save-attribute-group").click(function(){
$("#attribute-group-form").submit();
})
</script>
<?php
$form = new UIAdminEditForm('post', 'index.php?rule=attribute_group_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'attribute-group-form');
$attributeGroup = AttributeGroup::loadData();
$items = array(AttributeGroup::GROUP_TYPE_SELECT => '下單菜單', AttributeGroup::GROUP_TYPE_RADIO => '單選按鈕', AttributeGroup::GROUP_TYPE_CHECKBOX => '複選框');
$form->items = array('name' => array('title' => '屬性值', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'group_type' => array('title' => '類別', 'type' => 'radio', 'value' => isset($obj) ? $obj->group_type : Tools::Q('group_type'), 'items' => $items), 'saveAttributeGroup' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add'));
echo UIViewBlock::area(array('title' => '編輯', 'body' => $form->draw()), 'panel');
示例2: AttributeGroup
$select_cat = Tools::P('itemsBox');
$attributeGroup = new AttributeGroup();
if ($attributeGroup->deleteMulti($select_cat)) {
UIAdminAlerts::conf('商品特征已刪除');
}
}
/** 初始化表格 */
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('attribute_group', 'AttributeGroup', 'id_attribute_group');
$table->addAttribte('id', 'feature');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_attribute_group', 'title' => 'ID', 'filter' => 'string', 'rule' => 'attribute'), array('name' => 'name', 'title' => '名稱', 'filter' => 'string', 'rule' => 'attribute'), array('name' => 'position', 'title' => '排序'), array('sort' => false, 'title' => '操作', 'width' => '120px', 'class' => 'text-right', 'isAction' => array('edit', 'delete')));
$filter = $table->initFilter();
$orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'position';
$orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'asc';
$limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50';
$p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1;
$result = AttributeGroup::loadData($p, $limit, $orderBy, $orderWay, $filter);
/** 錯誤處理 */
if (isset($errors)) {
UIAdminAlerts::MError($errors);
}
/** 輸出導航 */
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '屬性', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '新屬性組', 'href' => 'index.php?rule=attribute_group_edit', 'class' => 'btn-success', 'icon' => 'plus'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
/** 輸出屬性組 */
$btn_group = array(array('type' => 'button', 'title' => '刪除選中', 'confirm' => '確定要刪除選中項?', 'name' => 'delSelected', 'btn_type' => 'submit', 'class' => 'btn-danger'));
echo UIViewBlock::area(array('title' => '用戶留言', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');