public function saveAppBlogMultimediaEntriesList($con = null) { if (!$this->isValid()) { throw $this->getErrorSchema(); } if (!isset($this->widgetSchema['app_blog_multimedia_entries_list'])) { // somebody has unset this widget return; } if (null === $con) { $con = $this->getConnection(); } $c = new Criteria(); $c->add(AppBlogMultimediaEntriesPeer::ENTRIES_ID, $this->object->getPrimaryKey()); AppBlogMultimediaEntriesPeer::doDelete($c, $con); $values = $this->getValue('app_blog_multimedia_entries_list'); if (is_array($values)) { foreach ($values as $value) { $obj = new AppBlogMultimediaEntries(); $obj->setEntriesId($this->object->getPrimaryKey()); $obj->setMultimediaId($value); $obj->save(); } } }