function getDisplayIntro() { if (!($intro = $this->getHeaderRef())) { $intro = new Article(AMP_Registry::getDbcon()); $intro->setDefaults(); $intro->mergeData(array('publish' => 1, 'title' => $this->getName() . $this->getListNameSuffix(), 'body' => $this->getBlurb(), 'class' => AMP_CONTENT_CLASS_SECTIONHEADER)); } return $intro->getDisplay(); }
function save($data, $options = array()) { $options = array_merge($this->getOptions(), $options); $data = $this->validate($data, $options); if (!$data) { return false; } $article = new Article(AMP_Registry::getDbcon()); $article->setDefaults(); $article->mergeData($data); $result = $article->save(); if (!$result) { return false; } if (isset($options['result_mapping']) && $options['result_mapping']) { $update_array[$options['result_mapping']] = $article->id; $save_plugin =& $this->udm->registerPlugin('AMP', 'Save'); $save_plugin->save($update_array); } return $result; }