Created
January 29, 2011 05:37
-
-
Save jmather/801568 to your computer and use it in GitHub Desktop.
Example of how to prepare a form for embedding
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 configure() | |
{ | |
parent::configure(); | |
unset($this['id']); | |
unset($this['uuid'], $this['video_media'], $this['audio_media'], $this['photo_media'], $this['gallery_media']); | |
unset($this['created_at'], $this['updated_at']); | |
$gal_widget_opts = array('multiple' => true, 'model' => 'majaxMediaGallery'); | |
if ($this->getObject()->getType() == 'Gallery') | |
{ | |
$gal_widget_opts['exclude'] = $this->getObject()->getObject()->id; | |
} | |
$this->setWidget('galleries_list', new majaxMediaWidgetFormGallery($gal_widget_opts)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment