Skip to content

Instantly share code, notes, and snippets.

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 jmather/801568 to your computer and use it in GitHub Desktop.
Save jmather/801568 to your computer and use it in GitHub Desktop.
Example of how to prepare a form for embedding
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