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