本文整理汇总了PHP中rmrevin\yii\fontawesome\FA::getConstants方法的典型用法代码示例。如果您正苦于以下问题:PHP FA::getConstants方法的具体用法?PHP FA::getConstants怎么用?PHP FA::getConstants使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rmrevin\yii\fontawesome\FA
的用法示例。
在下文中一共展示了FA::getConstants方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetConstants
public function testGetConstants()
{
$this->assertNotEmpty(FA::getConstants(false));
$this->assertNotEmpty(FA::getConstants(true));
}
示例2:
<?php
echo $form->field($node, $nameAttribute, ['addon' => ['prepend' => ['content' => Inflector::titleize('menu_name')]]])->textInput($inputOpts)->label(false);
?>
</div>
</div>
<div class="row">
<div class="col-sm-8">
<?php
if (isset($module->treeViewSettings['fontAwesome']) && $module->treeViewSettings['fontAwesome'] == true) {
?>
<?php
echo $form->field($node, $iconAttribute)->widget(\kartik\select2\Select2::classname(), ['name' => 'Tree[' . $iconAttribute . ']', 'model' => $node, 'attribute' => $iconAttribute, 'addon' => ['prepend' => ['content' => Inflector::titleize($iconAttribute)]], 'data' => FA::getConstants(true), 'options' => ['id' => 'tree-' . $iconAttribute, 'placeholder' => Yii::t('app', 'Type to autocomplete'), 'multiple' => false], 'pluginOptions' => ['escapeMarkup' => new \yii\web\JsExpression("function(m) { return m; }"), 'allowClear' => true]])->label(false);
?>
<?php
} else {
?>
<?php
echo $form->field($node, $iconAttribute, ['addon' => ['prepend' => ['content' => Inflector::titleize($iconAttribute)]]])->textInput($inputOpts)->label(false);
?>
<?php
}
?>
</div>
<div class="col-sm-4">
<?php
echo $form->field($node, $iconTypeAttribute)->widget(\kartik\select2\Select2::classname(), ['name' => 'Tree[' . $iconTypeAttribute . ']', 'model' => $node, 'attribute' => $iconTypeAttribute, 'addon' => ['prepend' => ['content' => Inflector::titleize($iconTypeAttribute)]], 'data' => [TreeView::ICON_CSS => 'CSS Suffix', TreeView::ICON_RAW => 'Raw Markup'], 'options' => ['id' => 'tree-' . $iconTypeAttribute, 'placeholder' => Yii::t('app', 'Select'), 'multiple' => false] + $inputOpts, 'pluginOptions' => ['allowClear' => false]])->label(false);
?>