public function getValidTypes() { if (!isset($this->_validTypes)) { $this->_validTypes = X2Model::getModelTypes(true, function ($elem) { return X2Model::model($elem)->asa('X2LinkableBehavior'); }); } return $this->_validTypes; }
public static function getModelTypes($assoc = false) { return array_diff_key(X2Model::getModelTypes($assoc), array_flip(array('Fingerprint', 'Charts', 'EmailInboxes'))); }
</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>