Example #1
0
 public static function getAdminItems($key = null, $type = true)
 {
     $items = self::getRoleItems(self::Category_Admin);
     if ($type) {
         if (!array_key_exists('administrator', $items)) {
             $items['administrator'] = '超级管理员';
         }
     } else {
         if (array_key_exists('administrator', $items)) {
             unset($items['administrator']);
         }
     }
     return ArrayHelper::getItems($items, $key);
 }
Example #2
0
 public static function getStickyItems($key = null)
 {
     $items = [1 => '一级置顶', 2 => '二级置顶', 3 => '三级置顶', 4 => '四级置顶', 5 => '五级置顶', 6 => '六级置顶', 7 => '七级置顶', 8 => '八级置顶', 9 => '九级置顶'];
     return ArrayHelper::getItems($items, $key);
 }
Example #3
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['id' => 'ID', 'category_id' => '碎片分类', 'name' => '名称', 'description' => '描述', 'type' => '类型'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #4
0
 public static function getFormItems($key = null)
 {
     $items = [self::Form_Boolean => '布尔型', self::Form_Input => '单选输入框', self::Form_Textarea => '多行输入框', self::Form_RadioList => '单选', self::Form_CheckboxList => '多选'];
     return ArrayHelper::getItems($items, $key);
 }
Example #5
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['sys_theme_home' => '前台主题', 'sys_theme_admin' => '后台主题'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #6
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['cache' => '清空缓存', 'asset' => '清空Asset'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #7
0
 public static function getThirdLoginStatus($key = null)
 {
     $items = [self::Third_Login_Status_Open => '开启', self::Third_Login_Status_Close => '关闭'];
     return ArrayHelper::getItems($items, $key);
 }
Example #8
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['id' => '标识', 'name' => '名称', 'description' => '描述'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #9
0
 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);
 }
Example #10
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['id' => 'ID', 'parent_id' => '父结点', 'category_id' => '分类', 'name' => '名称', 'url' => '链接地址', 'target' => '打开方式', 'targetText' => '打开方式', 'description' => '描述', 'thumb' => '图片', 'status' => '状态', 'statusText' => '状态', 'sort_num' => '排序'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #11
0
 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);
 }
Example #12
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['id' => 'ID', 'name' => '名称', 'type' => '类型'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #13
0
 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);
 }
Example #14
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['id' => '名称', 'value' => '值'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #15
0
 public static function getCategoryItems($key = null)
 {
     $items = [self::Category_Member => '会员角色', self::Category_Admin => '管理员角色', self::Category_System => '系统角色'];
     return ArrayHelper::getItems($items, $key);
 }
Example #16
0
 public static function getAttributeLabels($attribute = null)
 {
     $items = ['test1' => 'test1 label', 'test2' => 'test2 label'];
     return ArrayHelper::getItems($items, $attribute);
 }
Example #17
0
 public function getModel($model)
 {
     $items = ['Taxonomy' => Taxonomy::className(), 'TaxonomyCategory' => TaxonomyCategory::className()];
     return ArrayHelper::getItems($items, $model, true);
 }
Example #18
0
 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);
 }
Example #19
0
 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);
 }