本文整理汇总了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');