當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。