OphCoTherapyapplication_DecisionTreeNode_ResponseType::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

echo $form->layoutColumns['field'];
?>
 column end">
		<?php 
if ($model->response_type && $model->response_type->datatype == 'bool') {
    $this->renderPartial('template_OphCoTherapyapplication_DecisionTreeNode_default_value_bool', array('name' => get_class($model) . '[default_value]', 'id' => get_class($model) . '_default_value', 'val' => $model->default_value));
} else {
    $this->renderPartial('template_OphCoTherapyapplication_DecisionTreeNode_default_value_default', array('name' => get_class($model) . '[default_value]', 'id' => get_class($model) . '_default_value', 'val' => $model->default_value));
}
?>
	</div>
</div>

<?php 
$html_options = array('options' => array(), 'empty' => '- Please select -');
foreach (OphCoTherapyapplication_DecisionTreeNode_ResponseType::model()->findAll() as $rt) {
    $html_options['options'][(string) $rt->id] = array('data-datatype' => $rt->datatype);
}
echo $form->dropdownlist($model, 'response_type_id', CHtml::listData(OphCoTherapyapplication_DecisionTreeNode_ResponseType::model()->findAll(), 'id', 'label'), $html_options);
?>
<script id="template_default_value_default" type="text/html">
	<?php 
$this->renderPartial('template_OphCoTherapyapplication_DecisionTreeNode_default_value_default', array('name' => '{{name}}', 'id' => '{{id}}', 'val' => null));
?>
</script>
<script id="template_default_value_bool" type="text/html">
	<?php 
$this->renderPartial('template_OphCoTherapyapplication_DecisionTreeNode_default_value_bool', array('name' => '{{name}}', 'id' => '{{id}}', 'val' => null));
?>
</script>
All Usage Examples Of OphCoTherapyapplication_DecisionTreeNode_ResponseType::model