本文整理匯總了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'));
}
}