本文整理匯總了PHP中X2Model::getModelTypes方法的典型用法代碼示例。如果您正苦於以下問題:PHP X2Model::getModelTypes方法的具體用法?PHP X2Model::getModelTypes怎麽用?PHP X2Model::getModelTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類X2Model
的用法示例。
在下文中一共展示了X2Model::getModelTypes方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getValidTypes
public function getValidTypes()
{
if (!isset($this->_validTypes)) {
$this->_validTypes = X2Model::getModelTypes(true, function ($elem) {
return X2Model::model($elem)->asa('X2LinkableBehavior');
});
}
return $this->_validTypes;
}
示例2: getModelTypes
public static function getModelTypes($assoc = false)
{
return array_diff_key(X2Model::getModelTypes($assoc), array_flip(array('Fingerprint', 'Charts', 'EmailInboxes')));
}
示例3: array
</div>
<?php
echo '<div class="alternation-text">- ' . CHtml::encode(Yii::t('app', 'OR')) . ' -</div>';
?>
<div class='record-specification-container choice-container<?php
echo $model->getSelection() !== 'topLinkUrl' ? ' selected-choice' : '';
?>
'>
<?php
echo CHtml::tag('h3', array(), CHtml::encode(Yii::t('admin', 'Select a record:')));
echo $form->label($model, 'recordName');
if (!isset($model->recordType)) {
$model->recordType = 'Contacts';
}
echo $form->multiTypeAutocomplete($model, 'recordType', 'recordId', X2Model::getModelTypes(true, function ($elem) {
return X2Model::model($elem)->asa('X2LinkableBehavior');
}), array('autocompleteName' => 'recordName', 'autocompleteValue' => $model->recordName, 'htmlOptions' => array('class' => 'all-form-input-style')));
?>
</div>
<div class='extra-options-container'>
<?php
echo $form->checkBox($model, 'openInNewTab');
echo $form->label($model, 'openInNewTab', array('style' => 'display: inline;'));
?>
</div>
</div>
<?php
echo CHtml::submitButton(Yii::t('admin', "Create"), array('class' => 'x2-button', 'id' => 'create-top-bar-link'));
$this->endWidget();
?>
</div>