Skip to content

Instantly share code, notes, and snippets.

@amirkheirabadi73
Created June 16, 2013 07:57
Show Gist options
  • Save amirkheirabadi73/5791325 to your computer and use it in GitHub Desktop.
Save amirkheirabadi73/5791325 to your computer and use it in GitHub Desktop.
Create DropDown Menu Item Function In Mode()
model :
const type_one = 1;
const type_two = 2;
const type_three = 3;
public function getType(){
return array(
self::type_one => "one",
self::type_two => "two",
self::type_three => "Three"
)}
Views -> _form :
<?php echo $form->dropDownList($model,'fname',$model->getType()); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment