当前位置: 首页>>代码示例>>PHP>>正文


PHP CMS::user方法代码示例

本文整理汇总了PHP中CMS::user方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::user方法的具体用法?PHP CMS::user怎么用?PHP CMS::user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMS的用法示例。


在下文中一共展示了CMS::user方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOptions

 /**
  * @param string $key
  * @param mixed  $value
  *
  * @return mixed
  */
 public function getOptions($key, $value)
 {
     return \CMS::user()->lists($this->valueField, $this->keyField)->all();
 }
开发者ID:KodiComponents,项目名称:module-core,代码行数:10,代码来源:UserField.php

示例2: getUpdatedBy

 /**
  * @return User
  */
 public function getUpdatedBy()
 {
     if (is_null($this->updated_by)) {
         $this->updated_by = \CMS::user()->findOrNew($this->created_by);
     }
     return $this->updated_by;
 }
开发者ID:KodiComponents,项目名称:module-pages,代码行数:10,代码来源:FrontendPage.php

示例3: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     foreach (\CMS::user()->all() as $user) {
         DB::table('user_meta')->insert([['user_id' => $user->id, 'key' => WidgetManagerDashboard::WIDGET_SETTINGS_KEY, 'value' => '{"5756f21098fd0":{"id":"5756f21098fd0","type":"profiler","settings":[],"parameters":[],"size":{"x":5,"y":2,"max_size":[6,2],"min_size":[3,2]},"multiple":false,"packages":[],"updateSettingsPage":false},"5756f21263692":{"id":"5756f21263692","type":"kodicms_rss","settings":[],"parameters":[],"size":{"x":5,"y":2,"max_size":[5,10],"min_size":[3,2]},"multiple":false,"packages":[],"updateSettingsPage":false},"5756f218acc7f":{"id":"5756f218acc7f","type":"mini_calendar","settings":[],"parameters":[],"size":{"x":3,"y":1,"max_size":[5,1],"min_size":[3,1]},"multiple":false,"packages":[],"updateSettingsPage":false},"5756f21be3040":{"id":"5756f21be3040","type":"cache_button","settings":[],"parameters":[],"size":{"x":2,"y":1,"max_size":[2,1],"min_size":[2,1]},"multiple":false,"packages":[],"updateSettingsPage":false}}'], ['user_id' => $user->id, 'key' => WidgetManagerDashboard::WIDGET_BLOCKS_KEY, 'value' => '[{"col":1,"row":2,"x":5,"y":2,"max-size":[6,2],"min-size":[3,2],"id":"5756f21098fd0"},{"col":1,"row":4,"x":5,"y":2,"max-size":[5,10],"min-size":[3,2],"id":"5756f21263692"},{"col":1,"row":1,"x":3,"y":1,"max-size":[5,1],"min-size":[3,1],"id":"5756f218acc7f"},{"col":4,"row":1,"x":2,"y":1,"max-size":[2,1],"min-size":[2,1],"id":"5756f21be3040"}]']]);
     }
 }
开发者ID:KodiComponents,项目名称:module-dashboard,代码行数:11,代码来源:DashboardTableSeeder.php


注:本文中的CMS::user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。