本文整理匯總了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);
?>