本文整理汇总了PHP中kartik\mpdf\Pdf::className方法的典型用法代码示例。如果您正苦于以下问题:PHP Pdf::className方法的具体用法?PHP Pdf::className怎么用?PHP Pdf::className使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\mpdf\Pdf
的用法示例。
在下文中一共展示了Pdf::className方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
use kartik\mpdf\Pdf;
$params = array_merge(require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php');
return ['id' => 'app-frontend', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'name' => 'Sportoviště Dačice', 'controllerNamespace' => 'frontend\\controllers', 'defaultRoute' => 'page/home', 'components' => ['user' => ['identityClass' => 'common\\models\\UserRecord', 'enableAutoLogin' => true], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'urlManager' => ['enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [['pattern' => '<name>,<id:\\d+>/<article>,<ida:\\d+>/<web>/<language:\\w{2}>', 'route' => 'page/article'], ['pattern' => '<name>,<id:\\d+>/<article>,<ida:\\d+>/<language:\\w{2}>', 'route' => 'page/article'], ['pattern' => '<name>,<id:\\d+>/<article>,<ida:\\d+>/<web>', 'route' => 'page/article'], ['pattern' => '<name>,<id:\\d+>/<article>,<ida:\\d+>', 'route' => 'page/article'], ['pattern' => '<name>,<id:\\d+>/<web>/<language:\\w{2}>', 'route' => 'page/menu'], ['pattern' => '<name>,<id:\\d+>/<language:\\w{2}>', 'route' => 'page/menu'], ['pattern' => '<name>,<id:\\d+>/<web>', 'route' => 'page/menu'], ['pattern' => '<name>,<id:\\d+>', 'route' => 'page/menu'], ['pattern' => 'site/<action>/<web>/<language:\\w{2}>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>/<language:\\w{2}>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>/<web>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>,<id:\\d+>/<web>/<language:\\w{2}>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>,<id:\\d+>/<language:\\w{2}>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>,<id:\\d+>/<web>', 'route' => 'site/<action>'], ['pattern' => 'site/<action>,<id:\\d+>', 'route' => 'site/<action>'], ['pattern' => 'page/search/<web>/<language:\\w{2}>', 'route' => 'page/search'], ['pattern' => 'page/search/<language:\\w{2}>', 'route' => 'page/search'], ['pattern' => 'page/search/<web>', 'route' => 'page/search'], ['pattern' => 'page/tag/<tag:\\w+>/<web>/<language:\\w{2}>', 'route' => 'page/tag'], ['pattern' => 'page/tag/<tag:\\w+>/<language:\\w{2}>', 'route' => 'page/tag'], ['pattern' => 'page/tag/<tag:\\w+>/<web>', 'route' => 'page/tag'], ['pattern' => 'page/tag/<tag:\\w+>', 'route' => 'page/tag'], ['pattern' => 'page/rss/<web>/<language:\\w{2}>', 'route' => 'page/rss'], ['pattern' => 'page/rss/<language:\\w{2}>', 'route' => 'page/rss'], ['pattern' => 'page/rss/<web>', 'route' => 'page/rss'], ['pattern' => '<web>/<language:\\w{2}>', 'route' => 'page/home'], ['pattern' => '<language:\\w{2}>', 'route' => 'page/home'], ['pattern' => '<web>', 'route' => 'page/home'], ['pattern' => '', 'route' => 'page/home']]], 'errorHandler' => ['errorAction' => 'site/error'], 'i18n' => ['translations' => ['front*' => ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@frontend/messages', 'fileMap' => ['front' => 'front.php', 'front/error' => 'error.php']], 'app*' => ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@common/messages', 'fileMap' => ['app' => 'app.php', 'app/error' => 'error.php']], 'modules/reservation/res' => ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@backend/modules/reservation/messages', 'fileMap' => ['modules/reservation/res' => 'res.php']]]], 'pdf' => ['class' => Pdf::className(), 'cssFile' => '@webroot/basic-assets/css/pdf.css'], 'assetManager' => ['bundles' => ['dosamigos\\google\\maps\\MapAsset' => ['options' => ['key' => 'AIzaSyA-1jkGfN_9u8onoQytDufbAzK5eS2FYrY']]]]], 'params' => $params];
示例2: dirname
<?php
use kartik\mpdf\Pdf;
return ['vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'components' => ['authManager' => ['class' => 'yii\\rbac\\DbManager'], 'cache' => ['class' => 'yii\\caching\\FileCache'], 'pdf' => ['class' => Pdf::className(), 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER], 'formatter' => ['dateFormat' => 'php:d.m.Y', 'timeZone' => 'Europe/Moscow', 'locale' => 'ru_RU', 'datetimeFormat' => 'php:H:i:s d.m.Y', 'timeFormat' => 'php:H:i:s']], 'language' => 'ru-RU', 'on beforeRequest' => function () {
//$timezone = Yii::$app->user->identity->timezone;
if (!Yii::$app->user->isGuest) {
Yii::$app->formatter->timeZone = Yii::$app->user->identity->timezone;
}
}];