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


PHP Files::getfile方法代码示例

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


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

示例1: extract

 public static function extract($module_name, $module_id, $property)
 {
     $file = Files::getfile($module_name, $module_id);
     if (isset($file[$property]) && $file[$property]) {
         return $file[$property];
     } else {
         return false;
     }
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:9,代码来源:Files.php

示例2: homeView

 public static function homeView($data)
 {
     $data['page']->text = \WebAPL\Shortcodes::execute($data['page']->text);
     $data['page']['background'] = Files::getfile('page_bg', $data['page']->id);
     $data['sub_pages'] = Post::subPosts($data['page']->id, 2);
     foreach ($data['sub_pages'] as &$item) {
         $item['image_icon_big'] = Files::getfile('page_icon_big', $item->id);
     }
     $data['page_properies'] = PostProperty::getPostProperties($data['page']->id);
     if (in_array('show_news', $data['page_properies'])) {
         $data['home_posts'] = Post::findHomePosts('newsList');
     }
     if (in_array('show_ads', $data['page_properies'])) {
         $data['home_ads'] = Post::findHomePosts('adsList');
     }
     if (in_array('show_block_page', $data['page_properies'])) {
         $selected_page = PostProperty::postWithProperty('is_selected_page');
         if ($selected_page) {
             $data['home_page'] = $selected_page;
             $data['home_page']['childrens'] = Post::findWithParent($selected_page->id);
         }
     }
     return View::make('sections.pages.home')->with($data);
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:24,代码来源:PageView.php

示例3: findGeneral

 public static function findGeneral()
 {
     $list = Post::prepareQuery()->where(Post::getField('general_node'), 1)->orderBy('ord_num', 'asc')->get();
     foreach ($list as &$item) {
         Post::registerInCache($item);
         $item['url'] = Post::getFullURI($item->id);
         $item['image_icon'] = Files::getfile('page_icon', $item->id);
         $item['image_icon_active'] = Files::getfile('page_icon_active', $item->id);
         $item['image_icon_big'] = Files::getfile('page_icon_big', $item->id);
     }
     return $list;
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:12,代码来源:Post.php

示例4: register

 public function register()
 {
     $person_id = \Input::get('person_id');
     $name = \Input::get('name');
     $email = \Input::get('email');
     $person = PersonModel::join(PersonLangModel::getTableName(), PersonLangModel::getField('person_id'), '=', PersonModel::getField('id'))->select(PersonModel::getField('id'), PersonLangModel::getField('first_name'), PersonLangModel::getField('function'), PersonLangModel::getField('last_name'))->where(PersonModel::getField('for_audience'), 1)->where(PersonModel::getField('id'), $person_id)->where(PersonLangModel::getField('lang_id'), \WebAPL\Language::getId())->first();
     if ($person) {
         $item = new \FireChatSession();
         $item->user_email = $email;
         $item->user_name = $name;
         $item->person_id = $person_id;
         $item->save();
         $photo = \Files::getfile('person_chat', $person->id);
         if ($photo) {
             $person['photo'] = url($photo->path);
         } else {
             $person['photo'] = url('apps/frontend/modules/firechat/assets/chat.jpg');
         }
         \Session::put('chat_session_id', $item->id);
         return array('error' => 0, 'person' => $person, 'chat' => $item, 'html' => Template::moduleView($this->module_name, 'views.chat-iframe', array('person' => $person, 'chat' => $item))->render());
     } else {
         return array('error' => 1);
     }
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:24,代码来源:firechat.php

示例5: loadGeneralResources

 public static function loadGeneralResources()
 {
     $data = array('general_pages' => Post::findGeneral(), 'buttom_pages' => PostProperty::postsWithProperty('button_site', 3), 'favicon' => Files::getfile('website_favicon', 1), 'alert_post' => Post::findAlertPost());
     Template::setMetaMultiple(array('og:type' => 'page', 'og:image' => Files::extract('website_logo_' . WebAPL\Language::ext(), 1, 'path'), 'og:site_name' => SettingsModel::one('sitename')));
     View::share($data);
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:6,代码来源:PageController.php


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