- abstract function types();
- abstract function saveNoticeFromActivity($activity);
- abstract function activityFromNotice($notice);
- abstract function showNotice($notice, $out);
- abstract function entryForm();
+ /**
+ * Returns a localized string which represents this micro-app,
+ * to be shown to users selecting what type of post to make.
+ * This is paired with the key string in $this->tag().
+ *
+ * All micro-app classes must override this method.
+ *
+ * @return string
+ */
+ abstract function appTitle();
+
+ /**
+ * When building the primary notice form, we'll fetch also some
+ * alternate forms for specialized types -- that's you!
+ *
+ * Return a custom Widget or Form object for the given output
+ * object, and it'll be included in the HTML output. Beware that
+ * your form may be initially hidden.
+ *
+ * All micro-app classes must override this method.
+ *
+ * @param HTMLOutputter $out
+ * @return Widget
+ */
+ abstract function entryForm($out);
+
+ /**
+ *
+ */
+ public function newFormAction() {
+ // such as 'newbookmark' or 'newevent' route
+ return 'new'.$this->tag();
+ }
+
+ /**
+ * Output the HTML for this kind of object in a list
+ *
+ * @param NoticeListItem $nli The list item being shown.
+ *
+ * @return boolean hook value
+ */
+ function onStartShowNoticeItem(NoticeListItem $nli)
+ {
+ if (!$this->isMyNotice($nli->notice)) {
+ return true;
+ }