本文整理汇总了PHP中yii\web\AssetBundle::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AssetBundle::__construct方法的具体用法?PHP AssetBundle::__construct怎么用?PHP AssetBundle::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\web\AssetBundle
的用法示例。
在下文中一共展示了AssetBundle::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = [])
{
$this->js[] = $this->getGoogleMapScriptUrl();
$this->js[] = 'js/google-map-marker.js';
$this->css[] = 'css/google-map-marker.css';
parent::__construct($config);
}
示例2: __construct
public function __construct($config = [])
{
if (array_key_exists('js', $config)) {
$this->jsIsSet = true;
}
if (array_key_exists('css', $config)) {
$this->cssIsSet = true;
}
parent::__construct($config);
}
示例3: __construct
public function __construct($config = [])
{
$this->js[] = $this->getGoogleMapScriptUrl();
if (YII_DEBUG) {
$this->js[] = 'js/map-input-widget.js';
} else {
$this->js[] = 'js/map-input-widget.min.js';
}
parent::__construct($config);
}
示例4: __construct
public function __construct()
{
parent::__construct();
// Remove the default styles of the auth client.
$bundles = Yii::$app->assetManager->bundles;
$classPath = $this->depends[0];
if (isset($bundles[$classPath])) {
$bundles[$classPath]->css = [];
}
}
示例5: __construct
public function __construct($config = array())
{
parent::__construct($config);
if (Yii::$app->helper->isRtl()) {
$this->css[] = 'css/bootstrap-rtl.min.css';
}
if (Yii::$app->language == 'fa-IR') {
$this->css[] = 'css/font.min.css';
}
}
示例6: __construct
public function __construct($config = [])
{
$this->js[] = $this->getGoogleMapScriptUrl();
$this->js[] = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js";
if (YII_DEBUG) {
$this->js[] = 'js/map-input-widget.js';
} else {
$this->js[] = 'js/map-input-widget.min.js';
}
parent::__construct($config);
}
示例7: __construct
public function __construct()
{
parent::__construct();
// Path Configuration
$this->sourcePath = dirname(__DIR__) . '/resources';
// Load CSS
$this->css = ["styles/public.css"];
// Load Javascript
$this->js = ["scripts/vendor/conditionizr-4.4.0.min.js", "conditionizr/detects/ie6-ie7-ie8-ie9.js", "scripts/vendor/imagesloaded.pkgd-3.1.8.min.js", "scripts/cmgtools/cmt-core.js", "scripts/cmgtools/cmt-page-module.js", "scripts/main.js"];
// Define the Position to load Assets
$this->jsOptions = ["position" => View::POS_END];
// Define dependent Asset Loaders
$this->depends = ['yii\\web\\JqueryAsset'];
}
示例8: __construct
public function __construct()
{
parent::__construct();
// Change the default jQuery UI theme.
$this->configureJuiTheme('base');
// Get the current theme if set and valid.
$theme = Theme::theme();
// If not set or not valid, use the default theme.
if (!$theme) {
$this->depends = [static::$defaultThemeAsset];
return;
}
// Configure bootstrap and jQuery UI theme.
$this->configureBootstrap($theme->bootstrap);
$this->configureJuiTheme($theme->juiTheme);
// Setup the dependencies.
$this->configureDependencies($theme->depends);
$this->configureDependencies($theme->depends);
// Set source path for the theme assets and register CSS and JS.
$this->sourcePath = $theme->sourcePath;
$this->configureDependencies($theme->depends);
$this->configureCSS($theme->css);
$this->configureJS($theme->js);
}
示例9: __construct
public function __construct($config = array())
{
parent::__construct($config);
$this->basePath = str_replace(['work', 'hrm', 'kpi'], ['common'], Yii::getAlias("@webroot"));
}
示例10: __construct
public function __construct()
{
parent::__construct();
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->baseUrl = \yii::getAlias('@base_url');
}
示例12: __construct
public function __construct($config = [])
{
parent::__construct($config);
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
}
示例13: __construct
public function __construct()
{
parent::__construct();
// Path Configuration
$this->sourcePath = dirname(__FILE__) . '/resources';
}
示例14: __construct
/**
* @inheritdoc
*/
public function __construct($config = [])
{
$this->sourcePath = dirname(__FILE__);
parent::__construct($config);
}