*/
abstract function activityObjectFromNotice($notice);
- /**
- * Custom HTML output for your special notice; called when a
- * matching notice turns up in a NoticeListItem.
- *
- * All micro-app classes must override this method.
- *
- * @param Notice $notice
- * @param HTMLOutputter $out
- *
- * @fixme WARNING WARNING WARNING base plugin stuff below tries to close
- * a div that this function opens in the BookmarkPlugin child class.
- * This is probably wrong.
- */
- abstract function showNotice($notice, $out);
-
/**
* When building the primary notice form, we'll fetch also some
* alternate forms for specialized types -- that's you!
$adapter = $this->adaptNoticeListItem($nli);
if (!empty($adapter)) {
- $adapter->show();
+ $adapter->showNotice();
+ $adapter->showNoticeAttachments();
+ $adapter->showNoticeInfo();
+ $adapter->showNoticeOptions();
} else {
$this->oldShowNotice($nli);
}
$uri = $target->getUri();
if (!in_array($uri, $activity->context->attention)) {
// @todo FIXME: please document (i18n).
- // TRANS: Client exception.
+ // TRANS: Client exception thrown when ...
throw new ClientException(_('Bookmark not posted to this group.'));
}
} else if ($target instanceof User) {
(empty($original) ||
$original->profile_id != $target->id)) {
// @todo FIXME: Please document (i18n).
- // TRANS: Client exception.
+ // TRANS: Client exception when ...
throw new ClientException(_('Object not posted to this user.'));
}
} else {
return true;
}
- /**
- * Custom HTML output for your special notice; called when a
- * matching notice turns up in a NoticeListItem.
- *
- * All micro-app classes must override this method.
- *
- * @param Notice $notice
- * @param HTMLOutputter $out
- *
- * @fixme WARNING WARNING WARNING base plugin stuff below tries to close
- * a div that this function opens in the BookmarkPlugin child class.
- * This is probably wrong.
- */
- abstract function showNotice($notice, $out);
-
-
+ function showNotice($notice, $out)
+ {
+ // TRANS: Server exception thrown when a micro app plugin developer has not done his job too well.
+ throw new ServerException(_('You must implement either adaptNoticeListItem() or showNotice().'));
+ }
}