Created
October 8, 2010 08:39
-
-
Save mogi/616522 to your computer and use it in GitHub Desktop.
This file contains 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
public function setPhoto() | |
{ | |
$options = array( | |
'file_src' => '', | |
'is_image' => true, | |
'with_delete' => false, | |
'template' => get_partial('default/formEditImage', array('image' => $this->getObject())), | |
); | |
$this->setWidget('photo', new sfWidgetFormInputFileEditable($options, array('size' => 40))); | |
$this->setValidator('photo', new opValidatorImageFile(array('required' => false))); | |
} | |
public function setAlbumChoices() | |
{ | |
$choices = Doctrine::getTable('Album')->getMemberAlbumTitleArray($this->getObject()->getMemberId()); | |
$this->setWidget('album_id', new sfWidgetFormChoice(array('choices' => $choices, 'expanded' => false, 'multiple' => false))); | |
$this->setValidator('album_id', new sfValidatorChoice(array('choices' => array_keys($choices)))); | |
} | |
http://github.com/mogi/opAlbumPlugin/commit/d70e96524dcb6bee4e200b786f9098380e417a04#diff-7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment