Skip to content

Instantly share code, notes, and snippets.

@rajatsinghal
Created February 23, 2012 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajatsinghal/1891040 to your computer and use it in GitHub Desktop.
Save rajatsinghal/1891040 to your computer and use it in GitHub Desktop.
<?php
if (Yii::app()->user->isSuperuser) {
$all_roles=new RAuthItemDataProvider('roles', array(
'type'=>2,
));
$data=$all_roles->fetchData();
?>
<div>
<label for="type_id">Type</label>
<?php echo CHtml::dropDownList("Type",'',CHtml::listData($data,'name','name'));?>
</div>
<?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment