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


PHP Html::removeCssClass方法代码示例

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


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

示例1: run

 public function run()
 {
     echo Html::beginTag('img', $this->options);
     $this->options['src'] = ArrayHelper::remove($this->options, 'data-src');
     Html::removeCssClass($this->options, 'lazy');
     echo '<noscript>' . Html::beginTag('img', $this->options) . '</noscript>';
 }
开发者ID:gromver,项目名称:yii2-widgets,代码行数:7,代码来源:LazyLoadImage.php

示例2: init

 /**
  * @inheritdoc
  * @throws InvalidConfigException
  */
 public function init()
 {
     if (!class_exists($this->dropdownClass)) {
         throw new InvalidConfigException("The dropdownClass '{$this->dropdownClass}' does not exist or is not accessible.");
     }
     parent::init();
     Html::removeCssClass($this->options, 'nav');
 }
开发者ID:nextensions,项目名称:yii2-material-widgets,代码行数:12,代码来源:NavX.php

示例3: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     $cssClass = @$this->options['class'];
     parent::init();
     // significant order
     if ($cssClass != $this->options['class']) {
         \yii\helpers\Html::removeCssClass($this->options, 'nav');
     }
     $this->items = Item::find()->select(['*', 'parent_id' => '(IF(pid=1,"",pid))', 'name' => 'title'])->where(['visible' => true])->andWhere(['<>', 'pid', ''])->indexBy('id')->orderBy(['rank' => SORT_ASC])->asArray()->all();
 }
开发者ID:bariew,项目名称:yii2-page-cms-module,代码行数:13,代码来源:MainMenu.php

示例4: init

 /**
  * @inheritdoc
  * @throws \yii\base\InvalidConfigException
  */
 public function init()
 {
     parent::init();
     if ($this->label === null) {
         $this->label = $this->hasModel() ? $this->model->getAttributeLabel($this->attribute) : ArrayHelper::getValue($this->options, 'label', false);
     }
     Html::removeCssClass($this->options, 'ui');
     Ui::addCssClasses($this->wrapperOptions, ['ui', 'checkbox']);
     $this->wrapperOptions['id'] = $this->options['id'] . '-wrapper';
     $this->selector = $this->selector ?: '#' . $this->wrapperOptions['id'];
 }
开发者ID:2amigos,项目名称:yii2-semantic-ui,代码行数:15,代码来源:Checkbox.php

示例5: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->containerOptions, 'input-group date');
     Html::addCssClass($this->options, 'form-control');
     $this->options['readonly'] = 'readonly';
     if ($this->size !== null) {
         $size = 'input-' . $this->size;
         Html::addCssClass($this->options, $size);
         Html::addCssClass($this->containerOptions, $size);
     }
     if ($this->inline) {
         $this->clientOptions['linkField'] = $this->options['id'];
         Html::removeCssClass($this->containerOptions, 'date');
         Html::removeCssClass($this->containerOptions, 'input-group');
         Html::addCssClass($this->options, 'text-center');
     }
 }
开发者ID:efureev,项目名称:yii2-date-time-picker-widget,代码行数:21,代码来源:DateTimePicker.php

示例6: init

 public function init()
 {
     parent::init();
     Html::removeCssClass($this->options, 'dropdown-menu');
     Html::addCssClass($this->options, 'treeview-menu');
 }
开发者ID:kangqf,项目名称:kblog_with_yii2,代码行数:6,代码来源:AdminLTEDropdown.php

示例7: testRemoveCssClass

 public function testRemoveCssClass()
 {
     $options = ['class' => 'test test2 test3'];
     Html::removeCssClass($options, 'test2');
     $this->assertEquals(['class' => 'test test3'], $options);
     Html::removeCssClass($options, 'test2');
     $this->assertEquals(['class' => 'test test3'], $options);
     Html::removeCssClass($options, 'test');
     $this->assertEquals(['class' => 'test3'], $options);
     Html::removeCssClass($options, 'test3');
     $this->assertEquals([], $options);
 }
开发者ID:rajanishtimes,项目名称:basicyii,代码行数:12,代码来源:HtmlTest.php

示例8: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::removeCssClass($this->options, ['widget' => 'nav']);
     Html::addCssClass($this->options, ['navlist' => $this->warpClass]);
 }
开发者ID:Bright-Tech,项目名称:Yii2-Ace-Admin,代码行数:9,代码来源:Sidebar.php

示例9: rc

 /**
  * Removes css class from the icon
  * @param string $class
  * @return $this
  */
 public function rc($class)
 {
     Html::removeCssClass($this->options, $class);
     return $this;
 }
开发者ID:omnilight,项目名称:icons,代码行数:10,代码来源:Icon.php

示例10: switcher

 /**
  * Renders switcher
  * @see http://materializecss.com/forms.html#switches
  * @param array $options
  * @param array $flags
  * @return $this
  */
 public function switcher($options = [], $flags = null)
 {
     parent::checkbox($options, false);
     if ($flags === null) {
         $label = Html::encode($this->model->getAttributeLabel(Html::getAttributeName($this->attribute)));
         $labelParts = explode(',', $label);
         $flags = count($labelParts) >= 2 ? $labelParts : null;
     }
     if ($flags) {
         Html::removeCssClass($this->options, 'input-field');
         Html::addCssClass($this->options, 'switch');
         $labelContent = $flags[0] . $this->parts['{input}'] . Html::tag('span', '', ['class' => 'lever']) . $flags[1];
         $this->parts['{input}'] = Html::label($labelContent, Html::getInputId($this->model, $this->attribute));
     }
     return $this;
 }
开发者ID:tuyakhov,项目名称:yii2-materialize,代码行数:23,代码来源:ActiveField.php

示例11: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->_view = $this->grid->getView();
     if ($this->mergeHeader && !isset($this->vAlign)) {
         $this->vAlign = GridView::ALIGN_MIDDLE;
     }
     if ($this->grid->bootstrap === false) {
         Html::removeCssClass($this->filterInputOptions, 'form-control');
     }
     $this->parseFormat();
     $this->parseVisibility();
     $this->checkValidFilters();
     parent::init();
     $this->setPageRows();
     $this->initGrouping();
 }
开发者ID:georgepoulos,项目名称:DiavgeiaInsights,代码行数:19,代码来源:DataColumn.php

示例12:

 * +------------------------------------------------------------------------------
 * @Description
 * +------------------------------------------------------------------------------
 * @filename index.php 
 * @encoding UTF-8
 * @author xingcuntian<xingcuntian@sxxl.com>
 * @datetime 2015-07-03 11:02:40
 * @version 1.0
 * +------------------------------------------------------------------------------
 */
echo Html::tag('p', Html::encode('username'), ['class' => 'username']);
echo Html::tag('div', Html::encode("dddddddddddddddddd"), ['class' => 'div', 'id' => 'div']);
$options = ['class' => 'btn btn-default'];
$type = 'success';
if ($type === 'success') {
    Html::removeCssClass($options, 'btn-default');
    Html::addCssClass($options, 'btn-success');
}
echo Html::tag('div', 'sdsdsd dddd', $options);
$id = 2;
$option = [['id' => 1, 'name' => 'one'], ['id' => 2, 'name' => 'two'], ['id' => 3, 'name' => 'three'], ['id' => 4, 'name' => 'four']];
$post = ['title' => 'this is title', 'name' => 'this is name', 'child' => [1000, 200]];
echo Html::getInputName($model, 'username');
echo Html::getAttributeValue($model, 'username');
echo Html::tag('hr');
echo Html::getInputId($model, 'username');
echo Html::tag('hr');
?>

<?php 
echo Html::style('.username{color:red;font-size:8px;}');
开发者ID:xingcuntian,项目名称:component_test,代码行数:31,代码来源:index.php

示例13: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     Html::removeCssClass($this->options, 'nav');
     Html::addCssClass($this->options, 'sidebar-menu');
 }
开发者ID:kangqf,项目名称:kblog_with_yii2,代码行数:9,代码来源:AdminLTELeftNav.php

示例14: input

 /**
  * Renders an input tag.
  *
  * @param string $type the input type (e.g. 'text', 'password')
  * @param array $options the tag options in terms of name-value pairs. These will be rendered as
  * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
  * @return ActiveField object
  */
 public function input($type, $options = [])
 {
     $this->initPlaceholder($options);
     if ($type == 'range' || $type == 'color') {
         Html::removeCssClass($this->inputOptions, 'form-control');
     }
     $options = array_merge($this->inputOptions, $options);
     $this->parts['{input}'] = Html::activeInput($type, $this->model, $this->attribute, $options);
     return $this;
 }
开发者ID:CBETOBuT,项目名称:yii2-widgets,代码行数:18,代码来源:ActiveField.php

示例15: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::removeCssClass($this->options, ['nav', $this->navType]);
     Html::addCssClass($this->options, 'nav-tabs-custom');
 }
开发者ID:skoro,项目名称:yii2-admin-template,代码行数:9,代码来源:Tabs.php


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