コード例 #1
0
ファイル: MigrationGenerator.php プロジェクト: epigra/pmgen
 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->moduleDirectory = $this->getModuleDirectory();
     $this->generatorsDirectory = $this->getGeneratorsDirectory();
     \View::addNamespace('pmgenviews', $this->generatorsDirectory);
 }
コード例 #2
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('cednet/cms');
     $this->workbenchPath = __DIR__ . '/../..';
     include __DIR__ . '/../../routes_cms.php';
     \View::addNamespace('cms', __DIR__ . '/../../views');
     \Lang::addNamespace('cms', __DIR__ . '/../../lang');
 }
コード例 #3
0
ファイル: DriverAbstract.php プロジェクト: miladr/payby
 public function __construct()
 {
     $this->now = date("Y/m/d H:i:s");
     $this->ConfigFolder = realpath(__DIR__ . '/../../../config/banks/' . $this->drivername . '/');
     $this->bankConfig = \Config::get('Payby::banks\\' . $this->drivername . '\\config.info');
     \View::addLocation($this->ConfigFolder);
     \View::addNamespace('Payby', $this->ConfigFolder);
 }
コード例 #4
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/pages', __DIR__ . '/../../views');
     $this->package('voltcms/pages');
     CMS::addMenuItem('Pages', 'dashboard/pages');
     CMS::addJSFile('packages/voltcms/pages/js/custom.js');
     CMS::addJSFile('packages/voltcms/pages/js/app.js');
 }
コード例 #5
0
ファイル: Field.php プロジェクト: orangehill/photon
 protected function registerViewNamespace()
 {
     $childClass = get_class($this);
     $exploded = explode('\\', $childClass);
     $className = array_pop($exploded);
     $path = __DIR__ . '/../fields/' . str_replace('_', '-', snake_case($className));
     \View::addNamespace($childClass, $path);
 }
コード例 #6
0
 public function boot()
 {
     View::addNamespace('mailer', __DIR__ . '/../src/Components/views/mailer');
     View::addNamespace('cmd', app_path() . '/commands/views');
     View::addNamespace('socials', app_path('/src/Components/views/socials'));
     View::addNamespace('flash', app_path('src/Components/views/flashes'));
     View::addExtension('html', 'php');
     Validation::extend();
 }
コード例 #7
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/backup', __DIR__ . '/../../views');
     $this->package('voltcms/backup');
     $this->registerBackupCommand();
     $this->app->bind('Voltcms\\Backup\\uploader\\uploaderInterface', 'Voltcms\\Backup\\uploader\\GlacierUploader');
     $this->app->bind('aws', 'Voltcms\\Backup\\uploader\\implementations\\AWSUploader');
     $this->app->bind('dropbox', 'Voltcms\\Backup\\uploader\\implementations\\DropboxUploader');
 }
コード例 #8
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('yaro/jarboe');
     include __DIR__ . '/../../helpers.php';
     include __DIR__ . '/../../filters.php';
     include __DIR__ . '/../../routes.php';
     include __DIR__ . '/../../view_composers.php';
     \View::addNamespace('admin', __DIR__ . '/../../views/');
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('jeroen-g/laravel-photo-gallery', 'gallery');
     // Views will first be sought in app/views/gallery before the package view is used.
     \View::addNamespace('gallery', app_path() . '/views/gallery');
     \View::addNamespace('gallery', __DIR__ . '/../../views');
     // Shortcut for using the gallery language lines.
     \Lang::addNamespace('gallery', __DIR__ . '/../../lang');
     include __DIR__ . '/../../routes.php';
 }
コード例 #10
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/voltcms', __DIR__ . '/../../views');
     $this->package('voltcms/voltcms');
     $this->registerInstalationCommand();
     CMS::addCSSFile('packages/voltcms/voltcms/css/reset.css');
     CMS::addCSSFile('packages/voltcms/voltcms/css/style.css');
     CMS::addCSSFile('packages/voltcms/voltcms/redactor/redactor.css');
     CMS::addJSFile('packages/voltcms/voltcms/redactor/redactor.min.js');
     CMS::addJSFile('packages/voltcms/voltcms/js/retina.min.js');
 }
コード例 #11
0
 /**
  * Bootstrap the application events.
  */
 public function boot()
 {
     $configPath = base_path('vendor/rtconner/laravel-addresses/src/config/config.php');
     $viewsPath = base_path('vendor/rtconner/laravel-addresses/src/views');
     $migrationsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations');
     $seedsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations/seeds');
     $this->publishes([$migrationsPath => database_path() . '/migrations']);
     $this->publishes([$seedsPath => database_path() . '/seeds']);
     $this->publishes([$configPath => config_path('addresses.php')], 'config');
     \View::addNamespace('addresses', $viewsPath);
     $this->loadViewsFrom($viewsPath, 'Addresses');
 }
コード例 #12
0
ファイル: Module.php プロジェクト: acmadi/modules
 /**
  * Creating new services, namespaces and others.
  *
  * @return void
  */
 protected function create($module)
 {
     $path = $this->path;
     \View::addNamespace($module, $path . $module . '/views');
     \Config::addNamespace($module, $path . $module . '/config');
     // create aliases for controllers and models
     $use_alias = \Config::get($module . '::app.alias');
     if ($use_alias == TRUE) {
         $this->createAliases($module);
     }
     $modulePath = $path . $module;
     \ClassLoader::addDirectories(array($modulePath . '/commands', $modulePath . '/controllers', $modulePath . '/models', $modulePath . '/database/seeds'));
 }
コード例 #13
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('vis/builder');
     include __DIR__ . '/../../helpers.php';
     include __DIR__ . '/../../filters.php';
     include __DIR__ . '/../../routes.php';
     include __DIR__ . '/../../view_composers.php';
     include __DIR__ . '/../../events/settings.php';
     include __DIR__ . '/../../events/users.php';
     include __DIR__ . '/../../events/translate.php';
     include __DIR__ . '/../../events/table.php';
     $this->app['config']->package('builder', app_path() . '/config/packages/vis/builder/', "builder");
     \View::addNamespace('admin', __DIR__ . '/../../views/');
 }
コード例 #14
0
 /**
  * {@inheritDoc}
  */
 public function boot()
 {
     $this->package('payum/payum-laravel-package');
     \View::addNamespace('payum/payum', __DIR__ . '/../../views');
     $this->app->error(function (ReplyInterface $reply) {
         $response = null;
         if ($reply instanceof SymfonyHttpResponse) {
             $response = $reply->getResponse();
         } elseif ($reply instanceof HttpResponse) {
             $response = new Response($reply->getContent());
         } elseif ($reply instanceof HttpRedirect) {
             $response = new RedirectResponse($reply->getUrl());
         }
         if ($response) {
             return $response;
         }
         $ro = new \ReflectionObject($reply);
         throw new LogicException(sprintf('Cannot convert reply %s to Laravel response.', $ro->getShortName()), null, $reply);
     });
     \Route::any('/payment/authorize/{payum_token}', array('as' => 'payum_authorize_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\AuthorizeController@doAction'));
     \Route::any('/payment/capture/{payum_token}', array('as' => 'payum_capture_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\CaptureController@doAction'));
     \Route::any('/payment/refund/{payum_token}', array('as' => 'payum_refund_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\RefundController@doAction'));
     \Route::get('/payment/notify/{payum_token}', array('as' => 'payum_notify_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doAction'));
     \Route::get('/payment/notify/unsafe/{payment_name}', array('as' => 'payum_notify_do_unsafe', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doUnsafeAction'));
     $this->app['payum'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $payum = new ContainerAwareRegistry(\Config::get('payum-laravel-package::payments'), \Config::get('payum-laravel-package::storages'));
         $payum->setContainer($app);
         return $payum;
     });
     $this->app['payum.security.token_storage'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $tokenStorage = \Config::get('payum-laravel-package::token_storage');
         return is_object($tokenStorage) ? $tokenStorage : $app[$tokenStorage];
     });
     $this->app['payum.security.token_factory'] = $this->app->share(function ($app) {
         return new TokenFactory($app['payum.security.token_storage'], $app['payum'], 'payum_capture_do', 'payum_notify_do', 'payum_authorize_do', 'payum_refund_do');
     });
     $this->app['payum.security.http_request_verifier'] = $this->app->share(function ($app) {
         return new HttpRequestVerifier($app['payum.security.token_storage']);
     });
 }
コード例 #15
0
 public function register()
 {
     //
     \View::addNamespace('BW', __DIR__ . '/../../views');
     //
     $this->app->register('BW\\Providers\\FlashServiceProvider');
     $this->app->register('BW\\Providers\\CommandServiceProvider');
     $this->app->register('BW\\Providers\\ComposerServiceProvider');
     // Register facade
     $this->app->bind('bw.admin', function ($app) {
         return new \BW\BWAdmin();
     });
     // Register alias
     $loader = \Illuminate\Foundation\AliasLoader::getInstance();
     $loader->alias('BWAdmin', 'BW\\Support\\Facades\\BWFacade');
     //
     \App::bind('Illuminate\\Routing\\ResourceRegistrar', function () {
         return \App::make('BW\\Providers\\ResourceNoPrefixRegistrar');
     });
 }
コード例 #16
0
ファイル: FormController.php プロジェクト: ratno/Doptor
 public function __construct()
 {
     parent::__construct();
     // Add location hinting for views
     View::addNamespace('forms', app_path() . "/views/{$this->link_type}/{$this->current_theme}/forms");
 }
コード例 #17
0
ファイル: Theme.php プロジェクト: hilabs/Theme
 /**
  * Register custom namespaces for specified theme.
  *
  * @param string $theme
  * @return null
  */
 public function registerNamespace($theme)
 {
     $this->viewFactory->addNamespace('theme', $this->getThemePath($theme));
 }
コード例 #18
0
ファイル: global.php プロジェクト: Metrakit/dynamix
<?php

/*
|--------------------------------------------------------------------------
| Register Theme
|--------------------------------------------------------------------------
|
|
*/
//Get themes
//Set namespace with override support
View::addNamespace('theme', [base_path() . '/theme/' . Theme::getThemeName() . '/views', base_path() . '/theme/default/views']);
/*
|--------------------------------------------------------------------------
| Register The Modules Providers
|--------------------------------------------------------------------------
|
|
*/
foreach (Config::get('module') as $module) {
    App::register('Dynamix\\' . $module . '\\' . $module . 'ServiceProvider');
}
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
コード例 #19
0
ファイル: start.php プロジェクト: hilmysyarif/sisfito
<?php

/*
|--------------------------------------------------------------------------
| Register Namespaces And Routes
|--------------------------------------------------------------------------
|
| When a module starting, this file will executed automatically. This helps
| to register some namespaces like translator or view. Also this file
| will load the routes file for each module. You may also modify
| this file as you want.
|
*/
Lang::addNamespace('agreement', __DIR__ . '/Resources/lang');
View::addNamespace('agreement', __DIR__ . '/Resources/views');
require __DIR__ . '/Http/routes.php';
コード例 #20
0
ファイル: init.php プロジェクト: ycms/framework
        //kd($module->getpath());
    }
}
//add_filter('theme_root',function($theme_root){
//    return __DIR__;
//});
//add_filter('theme_root_uri',function($theme_root_uri = '', $siteurl = '', $stylesheet_or_template = ''){
//    kd($theme_root_uri, $siteurl, $stylesheet_or_template);
//    return content_url();
//});
show_admin_bar(false);
// 上传图片时把绝对地址修改成相对地址(禁用,导致上传文件http错误)
//add_filter('wp_handle_upload', function ($fileInfos){
//    global $blog_id;
//    $path = get_blog_option($blog_id, 'siteurl');
//
//    $fileInfos['url'] = str_replace($path, '', $fileInfos['url']);
//
//    return $fileInfos;
//});
add_action("user_register", function ($user_id) {
    update_user_meta($user_id, 'show_admin_bar_front', false);
    //update_user_meta( $user_id, 'show_admin_bar_admin', 'false' );
}, 10, 1);
if (is_dir(get_template_directory() . '/Resources/views')) {
    View::addLocation(get_template_directory() . '/Resources/views');
    View::addNamespace('tpl', get_template_directory() . '/Resources/views');
}
View::addLocation(get_template_directory());
View::addNamespace('default', get_template_directory());
//kd(get_template_directory());
コード例 #21
0
ファイル: routes.php プロジェクト: whoisdoma/installer
<?php

/**
*
* @category	Whoisdoma
* @package	Installer
* @copyright (c) 2013 XAOS Interactive
*
*/
View::addNamespace('whoisdoma_installer', __DIR__ . '/views/');
Route::any('install', 'Whoisdoma\\Installer\\Controller@run');
コード例 #22
0
 public function __construct()
 {
     \View::addNamespace('first-laravel-package', __DIR__ . '/../views');
 }
コード例 #23
0
ファイル: assist.php プロジェクト: rimshavbase/timefragment
 * 捕获无效参数异常
 */
App::error(function (InvalidArgumentException $exception) {
    // 获取异常消息、类型、核心内容
    preg_match('/([\\w ]+) \\[(.+)\\].+/', $exception->getMessage(), $messageArray);
    list($message, $type, $content) = $messageArray;
    switch ($type) {
        case 'View':
            // 没有找到对应的视图文件
            $link = link_to_route('makeView', '创建视图 ' . $content, $content);
            return Response::make($link);
            break;
        case 'No hint path defined for':
            // 没有找到对应的视图别名
            return Response::make('没有找到对应的视图别名 ' . $content . '::');
            break;
    }
});
/**
 * 辅助创建视图
 */
Route::get('/5-say/make/view/{view}', array('as' => 'makeView', function ($view) {
    $view = strtr($view, '.', '/') . '.blade.php';
    $path = app_path('views/' . $view);
    File::isDirectory(dirname($path)) or File::makeDirectory(dirname($path));
    File::put($path, $view);
    return Redirect::back();
}));
// 注册视图别名
$view = View::addNamespace('5-say', __DIR__ . '/views');
include __DIR__ . '/core/routes.php';
コード例 #24
0
 /**
  * Set custom view folder, user themes are located in the root
  */
 private function setThemeFolder()
 {
     \View::addNamespace('pageblok', app('path') . '/../themes');
     //\View::addLocation(app('path') . '/../themes');
 }
コード例 #25
0
ファイル: start.php プロジェクト: imihael/fluxbb-core
<?php

if (FluxBB\Core::isInstalled()) {
    Config::set('database.connections.fluxbb', Config::get('fluxbb.database'));
    //    DB::setDefaultConnection('fluxbb');
}
// Load our helpers (composers, macros, validators etc.)
include __DIR__ . '/helpers.php';
// Add another namespace for localized mail templates
View::addNamespace('fluxbb:mail', __DIR__ . '/lang/' . Config::get('app.locale') . '/mail/');
/*
// Set up our custom session handler
if (!Request::cli() && !Session::started()) {
    Session::extend('fluxbb::session', function() {
        return new fluxbb\Session\Driver(Laravel\Database::connection());
    });

    Config::set('session.driver', 'fluxbb::session');

    Session::load();
}
*/
コード例 #26
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     \View::addNamespace('Noaa', $this->guessPackagePath() . '/NoaaRss/Views');
     include $this->guessPackagePath() . '/NoaaRss/Routes.php';
 }
コード例 #27
0
 public function boot()
 {
     \Lang::addNamespace('api', __DIR__ . '/../Resources/lang');
     \View::addNamespace('api', __DIR__ . '/../Resources/views');
 }
コード例 #28
0
ファイル: ModuleService.php プロジェクト: ksp-media/laikacms
 private function _addViewNamespaces()
 {
     foreach ($this->_moduleList as $module) {
         \View::addNamespace(lcfirst($module['name']), $module['dir'] . '/views');
     }
 }
コード例 #29
0
ファイル: global.php プロジェクト: LaraGit/larapress
|
| In order to keep larapress completely isolated from your application
| we require an extra start file here. This allows you updating larapress
| with no worries about breaking your code.
|
*/
require app_path() . '/Larapress/start.php';
/*
|--------------------------------------------------------------------------
| Namespace The Larapress Views
|--------------------------------------------------------------------------
|
| In order to keep larapress completely isolated from your application we
| are using our own namespaced views directory. This also comes in handy
| if you want to apply your own theme to larapress. (You could just
| duplicate app/Larapress/Views/* and change the directory below)
|
*/
View::addNamespace('larapress', __DIR__ . '/../Larapress/Views');
/*
|--------------------------------------------------------------------------
| Namespace The Larapress Lang Files
|--------------------------------------------------------------------------
|
| In order to keep larapress completely isolated from your application we
| are using our own namespaced lang directory. This also comes in handy
| if you want to apply your own translations to larapress. (You could just
| duplicate app/Larapress/Lang/* and change the directory below)
|
*/
Lang::addNamespace('larapress', __DIR__ . '/../Larapress/Lang');
コード例 #30
0
ファイル: start.php プロジェクト: aguaragazu/LaravelStart
<?php

/*
|--------------------------------------------------------------------------
| Register Namespaces And Routes
|--------------------------------------------------------------------------
|
| When a module starting, this file will executed automatically. This helps
| to register some namespaces like translator or view. Also this file
| will load the routes file for each module. You may also modify
| this file as you want.
|
*/
Lang::addNamespace('auth', __DIR__ . '/Resources/lang');
View::addNamespace('auth', __DIR__ . '/Resources/views');
require __DIR__ . '/Http/routes.php';