Created
June 16, 2013 07:57
-
-
Save amirkheirabadi73/5791325 to your computer and use it in GitHub Desktop.
Create DropDown Menu Item Function In Mode()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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