本文整理汇总了PHP中Item::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::getList方法的具体用法?PHP Item::getList怎么用?PHP Item::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item::getList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$id = Yii::app()->request->getParam('id', 0);
$order_info = Order::updateList($id);
$item_info = Item::getList();
//print_r($order_info);die;
$var = array('order_info' => $order_info, 'item_info' => $item_info);
$this->controller->render('update', $var);
}
示例2: run
public function run()
{
$nurseUser_model = new NurseUser();
$itemrealte_model = new ItemRelate();
$item_model = Item::getList();
$com_id = $this->controller->comId;
//定义性别信息
$sex = array('0' => '男', '1' => '女');
//定义服务信息
$item = array();
foreach ($item_model as $V) {
$item[$V['id']] = $V['name'];
}
if (isset($_POST['NurseUser'])) {
// $_POST['NurseUser']['item_relate_id']=implode(',',$_POST['NurseUser']['item_relate_id']);
$nurseUser_model->attributes = $_POST['NurseUser'];
//文件上传
$file = CUploadedFile::getInstance($nurseUser_model, 'thumb');
//获取表单名为thumb的上传信息
if (is_object($file) && get_class($file) === 'CUploadedFile') {
$filename = date("YmdHis") . '_' . rand(0, 9999) . '.' . $file->extensionName;
//获取文件名
$nurseUser_model->thumb = '/images/weimob/' . $filename;
//数据库中要存放文件名
$uploadfile = './images/weimob/' . $filename;
$file->saveAs($uploadfile, true);
//上传操作
}
//print_r($_POST['ItemRelate']['item_id']);die;
if ($nurseUser_model->save()) {
if (isset($_POST['ItemRelate'])) {
foreach ($_POST['ItemRelate']['item_id'] as $V) {
$_POST['ItemRelate']['item_id'] = $V;
$_POST['ItemRelate']['nurser_id'] = $nurseUser_model->id;
//克隆新对象,防止覆盖前面保存的数据
$_itemrealte_model = clone $itemrealte_model;
$_itemrealte_model->attributes = $_POST['ItemRelate'];
$_itemrealte_model->save();
}
}
$this->controller->redirect('/mama/nurseuser/index');
}
}
$vars = array('sex' => $sex, 'nurseUser_model' => $nurseUser_model, 'itemrealte_model' => $itemrealte_model, 'item' => $item, 'item_model' => $item_model);
$this->controller->render('add', $vars);
}
示例3: getSitemap
public function getSitemap()
{
$urls = [];
$urlPrefix = 'http://' . \Difra\Envi::getHost();
$categories = Category::getList(true);
if (!empty($categories)) {
foreach ($categories as $category) {
$urls[] = ['loc' => $urlPrefix . $category->getFullLink()];
}
}
$items = Item::getList(null, -1, 1, null, true);
if (!empty($items)) {
foreach ($items as $item) {
$urls[] = ['loc' => $urlPrefix . $item->getFullLink()];
}
}
if (empty($urls)) {
return false;
}
return $urls;
}
示例4: run
public function run()
{
$item_model = Item::getList();
$this->controller->render('index', array('item_model' => $item_model));
}
示例5: display
public function display()
{
$this->view->list = Item::getList();
$this->view->display();
}
示例6: array
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/../init.inc.php';
Template::SetTitle('首页');
$options = array('type_id' => (int) $_REQUEST['type']);
$itemType = ItemType::getList();
$itemList = Item::getList($options);
Template::assign('itemType', $itemType);
Template::assign('itemList', $itemList);
Template::display('list.tpl');