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


PHP BaseFileHelper::filterPath方法代码示例

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


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

示例1: bootstrap

 /** @inheritdoc */
 public function bootstrap($app)
 {
     /* Config Translation */
     if (!isset($app->get('i18n')->translations['adminlte*'])) {
         $app->get('i18n')->translations['adminlte*'] = ['class' => PhpMessageSource::className(), 'basePath' => __DIR__ . '/messages'];
     }
     /* Config Theme */
     if (!isset($app->view->theme)) {
         $app->view->theme = new \yii\base\Theme(['pathMap' => ['@app/views/layouts' => '@cjtterabytesoft/adminlte/basic/views/layouts', '@app/views/site' => '@cjtterabytesoft/adminlte/basic/views/site']]);
     }
     /* Copy Avatar Images */
     if (\yii\helpers\BaseFileHelper::filterPath(\Yii::getAlias('@app/web/images'), $options = [])) {
         \yii\helpers\BaseFileHelper::copyDirectory(\Yii::getAlias('@cjtterabytesoft/adminlte/basic/images/'), \Yii::getAlias('@app/web/images'));
     }
     /* Config Params */
     if (!isset($app->params['adminEmail'])) {
         $app->params['adminEmail'] = 'admin@example.com';
     }
     if (!isset($app->params['AdminLTESkin'])) {
         $app->params['AdminLTESkin'] = 'skin-yellow';
     }
     if (!isset($app->params['Author'])) {
         $app->params['Author'] = '2015 - Wilmer Arambula';
     }
     if (!isset($app->params['Facebook_Account'])) {
         $app->params['Facebook_Account'] = 'https://www.facebook.com/username';
     }
     if (!isset($app->params['Google_Account'])) {
         $app->params['Google_Account'] = 'https://www.google.com/+username';
     }
     if (!isset($app->params['Linkedin_Account'])) {
         $app->params['Linkedin_Account'] = 'https://www.linkedin.com/in/username';
     }
     if (!isset($app->params['Twitter_Account'])) {
         $app->params['Twitter_Account'] = 'https://twitter.com/username';
     }
     if (!isset($app->params['WebName'])) {
         $app->params['WebName'] = 'My Application';
     }
     if (!YII_ENV_TEST) {
         if (!isset($app->params['imagesurl_30'])) {
             $app->params['imagesurl_30'] = 'http://www.basic.tk/images/avatar/profile/30/icon-avatar.png';
         }
         if (!isset($app->params['imagesurl_60'])) {
             $app->params['imagesurl_60'] = 'http://www.basic.tk/images/avatar/profile/60/icon-avatar.png';
         }
     } else {
         if (!isset($app->params['imagesurl_30'])) {
             $app->params['imagesurl_30'] = 'http://localhost.basic/images/avatar/profile/30/icon-avatar.png';
         }
         if (!isset($app->params['imagesurl_60'])) {
             $app->params['imagesurl_60'] = 'http://localhost.basic/images/avatar/profile/60/icon-avatar.png';
         }
     }
 }
开发者ID:cjtterabytesoft,项目名称:yii2-adminlte-basic,代码行数:56,代码来源:Bootstrap.php

示例2: bootstrap

 /** @inheritdoc */
 public function bootstrap($app)
 {
     /* Config Translation */
     if (!isset($app->get('i18n')->translations['adminlte*'])) {
         $app->get('i18n')->translations['adminlte*'] = ['class' => PhpMessageSource::className(), 'basePath' => __DIR__ . '/messages'];
     }
     /* Copy Avatar Images */
     if (\yii\helpers\BaseFileHelper::filterPath(\Yii::getAlias('@frontend/web/images'), $options = [])) {
         \yii\helpers\BaseFileHelper::copyDirectory(\Yii::getAlias('@cjtterabytesoft/adminlte/advanced/images/'), \Yii::getAlias('@frontend/web/images'));
     }
 }
开发者ID:cjtterabytesoft,项目名称:yii2-adminlte-advanced,代码行数:12,代码来源:Bootstrap.php


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