本文整理汇总了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;
}
}
示例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);
}
示例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;
}
示例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);
}
}
示例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);
}