function &_returnBlogPageFromRow(&$row) { $blogPagesPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName); $blogPagesPlugin->import('BlogPage'); $blogPage = new BlogPage(); $blogPage->setId($row['blog_page_id']); $blogPage->setPath($row['path']); $blogPage->setJournalId($row['journal_id']); $this->getDataObjectSettings('blog_page_settings', 'blog_page_id', $row['blog_page_id'], $blogPage); return $blogPage; }
/** * Save page into DB */ function save() { $plugin =& $this->plugin; $journalId = $this->journalId; $plugin->import('BlogPage'); $blogPagesDao =& DAORegistry::getDAO('BlogPagesDAO'); if (isset($this->blogPageId)) { $blogPage =& $blogPagesDao->getBlogPage($this->blogPageId); } if (!isset($blogPage)) { $blogPage = new BlogPage(); } $blogPage->setJournalId($journalId); $blogPage->setPath($this->getData('pagePath')); $blogPage->setTitle($this->getData('title'), null); // Localized $blogPage->setContent($this->getData('content'), null); // Localized if (isset($this->blogPageId)) { $blogPagesDao->updateBlogPage($blogPage); } else { $blogPagesDao->insertBlogPage($blogPage); } }