|
@@ 332-338 (lines=7) @@
|
| 329 |
|
public function addCssClass($class, $condition = true, $throw = false) |
| 330 |
|
{ |
| 331 |
|
if ($condition === false) { |
| 332 |
|
if (!empty($throw)) { |
| 333 |
|
$message = !is_string($throw) |
| 334 |
|
? 'Condition is false' |
| 335 |
|
: $throw; |
| 336 |
|
|
| 337 |
|
throw new \yii\base\InvalidConfigException($message); |
| 338 |
|
} |
| 339 |
|
} else { |
| 340 |
|
Html::addCssClass($this->options, $class); |
| 341 |
|
} |
|
@@ 357-363 (lines=7) @@
|
| 354 |
|
public function addTransformation($transformation, $condition = true, $throw = false) |
| 355 |
|
{ |
| 356 |
|
if ($condition === false) { |
| 357 |
|
if (!empty($throw)) { |
| 358 |
|
$message = !is_string($throw) |
| 359 |
|
? 'Condition is false' |
| 360 |
|
: $throw; |
| 361 |
|
|
| 362 |
|
throw new \yii\base\InvalidConfigException($message); |
| 363 |
|
} |
| 364 |
|
} else { |
| 365 |
|
$transformations = ArrayHelper::getValue($this->options, ['data', FA::$cssPrefix . '-transform'], []); |
| 366 |
|
if (!ArrayHelper::isIn($transformation, $transformations)) { |
|
@@ 387-393 (lines=7) @@
|
| 384 |
|
public function addMask($maskIcon, $condition = true, $throw = false) |
| 385 |
|
{ |
| 386 |
|
if ($condition === false) { |
| 387 |
|
if (!empty($throw)) { |
| 388 |
|
$message = !is_string($throw) |
| 389 |
|
? 'Condition is false' |
| 390 |
|
: $throw; |
| 391 |
|
|
| 392 |
|
throw new \yii\base\InvalidConfigException($message); |
| 393 |
|
} |
| 394 |
|
} else { |
| 395 |
|
ArrayHelper::setValue($this->options, ['data', FA::$cssPrefix . '-mask'], |
| 396 |
|
FA::i($maskIcon)->options['class']); |