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


PHP Theme::section方法代码示例

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


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

示例1: get

 /**
  * Get widgets for a base
  *
  * @param string $base
  * @return string
  */
 public function get($base)
 {
     if (!isset(static::$widgets[$base])) {
         return false;
     }
     $paglets = [];
     $content = '';
     foreach (static::$widgets[$base] as $widget) {
         $paglets[] = $widget;
         if (!\Config::get('enable-bigpipe')) {
             $content .= \Theme::section($widget['view'], $widget['data']);
         }
     }
     if (\Config::get('enable-bigpipe')) {
         echo "<div class='pagelets' data-id='" . $base . "' data-content='" . perfectSerialize($paglets) . "'></div>";
     }
     return $content;
 }
开发者ID:weddingjuma,项目名称:world,代码行数:24,代码来源:Widget.php

示例2: render

 public function render()
 {
     $data = ['path' => 'notification.display', 'notification' => $this->entity];
     if ($this->entity->user) {
         try {
             $data = array_merge($data, empty($this->entity->data) ? [] : perfectUnserialize($this->entity->data));
             /**
              * @var $path
              */
             extract($data);
             /**user have seen it**/
             $this->entity->markSeen();
             return \Theme::section($path, $data);
         } catch (\Exception $e) {
             $this->entity->delete();
         }
     } else {
         $this->entity->delete();
     }
 }
开发者ID:adamendvy89,项目名称:intifadah,代码行数:20,代码来源:NotificationPresenter.php

示例3: function

<?php

Event::listen('inline-post-text', function ($post) {
    if (!empty($post->text) and !isEnglish($post->text)) {
        echo Theme::section('autotranslator::link', ['post' => $post]);
    }
});
开发者ID:weddingjuma,项目名称:world,代码行数:7,代码来源:bindings.php

示例4: app

$posts = app('App\\Repositories\\PostRepository')->lists('user-timeline');
?>

<div data-lastcheck="" data-offset="{{\Config::get('post-per-page')}}" data-type="user-timeline"  id="post-list">

    {{Theme::extend('timeline-post')}}
    <?php 
$counter = 0;
?>
    @foreach($posts as $post)
        @if(Cache::has('post-'.$post->id))
            {{Cache::get('post-'.$post->id)}}
        @else
            <?php 
$postContent = (string) Theme::section('post.media', ['post' => $post]);
if (Config::get('enable-query-cache', 0)) {
    Cache::add('post-' . $post->id, $postContent, Config::get('post-cache-time-out', 3));
}
?>
            {{$postContent}}
        @endif
        {{Theme::extend('timeline-post-'.$counter)}}
        <?php 
$counter++;
?>
    @endforeach

</div>

开发者ID:weddingjuma,项目名称:world,代码行数:28,代码来源:feeds.blade.php

示例5: app

     */
    $mustAvoidUserRepository = app('App\\Repositories\\MustAvoidUserRepository');
    $users = $mustAvoidUserRepository->get();
    if (in_array(Auth::user()->id, $users)) {
        Auth::logout();
        Auth::logout();
        if (Request::ajax()) {
            return json_encode(['content' => 'login']);
        } else {
            return Redirect::guest('/');
        }
    }
});
Route::filter('maintenance', function () {
    if (Config::get('maintenance-mode', 0)) {
        return Theme::section('maintenance.mode');
    }
});
Route::filter('admincp-auth', function () {
    if (!Auth::check()) {
        return Redirect::route('admincp-login');
    }
    if (!Auth::user()->isAdmin()) {
        return Redirect::route('admincp-login');
    }
    //use here to update online status of this user
    Auth::user()->updateOnline();
});
Route::filter('auth.basic', function () {
    return Auth::basic();
});
开发者ID:weddingjuma,项目名称:world,代码行数:31,代码来源:filters.php

示例6: sleep

    }
    \Auth::logout();
    \Session::flush();
    sleep(1);
    \Auth::logout();
    \Session::flush();
    return \Redirect::to('/');
}]);
require 'routes/user.php';
require 'routes/post.php';
require 'routes/pages.php';
Route::any('load/pagelets', ['uses' => function () {
    $pagelets = perfectUnserialize(\Input::get('pagelets'));
    $content = "";
    foreach ($pagelets as $pagelet) {
        $content .= \Theme::section($pagelet['view'], $pagelet['data']);
    }
    echo $content;
}]);
if (!Config::get('disable-game', 0)) {
}
require 'routes/games.php';
require 'routes/message.php';
require 'routes/connection.php';
require 'routes/search.php';
require 'routes/discover.php';
require 'routes/help.php';
require 'routes/report.php';
require 'routes/additional-page.php';
require 'routes/notification.php';
require 'routes/photo.php';
开发者ID:weddingjuma,项目名称:world,代码行数:31,代码来源:routes.php


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