本文整理汇总了PHP中yii\helpers\ArrayHelper::getItems方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayHelper::getItems方法的具体用法?PHP ArrayHelper::getItems怎么用?PHP ArrayHelper::getItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\helpers\ArrayHelper
的用法示例。
在下文中一共展示了ArrayHelper::getItems方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => 'ID', 'fragment_id' => '碎片', 'title' => '标题', 'content' => '内容', 'created_at' => '添加时间', 'created_by' => '作者', 'sort_num' => '排序', 'status' => '状态'];
return ArrayHelper::getItems($items, $attribute);
}
示例2: getModel
public function getModel($model)
{
$items = ['Taxonomy' => Taxonomy::className(), 'TaxonomyCategory' => TaxonomyCategory::className()];
return ArrayHelper::getItems($items, $model, true);
}
示例3: getFormView
public function getFormView()
{
$items = [self::Form_Boolean => '_boolean', self::Form_Input => '_input', self::Form_Textarea => '_textarea', self::Form_RadioList => '_radiolist', self::Form_CheckboxList => '_checkboxlist'];
return ArrayHelper::getItems($items, $this->form);
}
示例4: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => '编号', 'parent_id' => '父级', 'category_id' => '分类', 'name' => '名称', 'value' => '值', 'description' => '描述', 'thumb' => '缩略图', 'status' => '状态', 'statusText' => '状态', 'sort_num' => '排序'];
return ArrayHelper::getItems($items, $attribute);
}
示例5: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => 'ID', 'fragment_id' => '碎片', 'title' => '标题', 'title_format' => '标题格式', 'thumb' => '缩略图', 'url' => '链接地址', 'sub_title' => '副标题', 'summary' => '简介', 'created_at' => '添加时间', 'created_by' => '作者', 'sort_num' => '排序', 'status' => '状态'];
return ArrayHelper::getItems($items, $attribute);
}
示例6: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['test1' => 'test1 label', 'test2' => 'test2 label'];
return ArrayHelper::getItems($items, $attribute);
}
示例7: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => 'ID', 'category_id' => '碎片分类', 'name' => '名称', 'description' => '描述', 'type' => '类型'];
return ArrayHelper::getItems($items, $attribute);
}
示例8: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => '编号', 'parent_id' => '父结点', 'category_id' => '分类', 'name' => '名称', 'url_alias' => '别名', 'redirect_url' => '跳转链接', 'thumb' => '缩略图', 'description' => '描述', 'page_size' => '每页大小', 'list_view' => '列表面view', 'list_layout' => '列表面layout', 'detail_view' => '内容页view', 'detail_layout' => '内容页layout', 'seo_title' => '标题', 'seo_keywords' => '关键字', 'seo_description' => '描述', 'contents' => '内容数量', 'sort_num' => '排序'];
return ArrayHelper::getItems($items, $attribute);
}
示例9: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => '标识', 'name' => '名称', 'description' => '描述'];
return ArrayHelper::getItems($items, $attribute);
}
示例10: getAttributeLabels
public static function getAttributeLabels($attribute = null)
{
$items = ['id' => 'ID', 'level' => 'Level', 'category' => '分类', 'log_time' => '时间', 'prefix' => 'IP/用户', 'message' => '内容'];
return ArrayHelper::getItems($items, $attribute);
}
示例11: getStickyItems
public static function getStickyItems($key = null)
{
$items = [1 => '一级置顶', 2 => '二级置顶', 3 => '三级置顶', 4 => '四级置顶', 5 => '五级置顶', 6 => '六级置顶', 7 => '七级置顶', 8 => '八级置顶', 9 => '九级置顶'];
return ArrayHelper::getItems($items, $key);
}
示例12: getCategoryItems
public static function getCategoryItems($key = null)
{
$items = [self::Category_Member => '会员角色', self::Category_Admin => '管理员角色', self::Category_System => '系统角色'];
return ArrayHelper::getItems($items, $key);
}