-
-class InlineAttachmentListItem extends AttachmentListItem
-{
- protected $thumb;
-
- function show()
- {
- $this->thumb = $this->attachment->getThumbnail();
- if (!empty($this->thumb)) {
- parent::show();
- }
-
- }
-
- function getThumbInfo()
- {
- return $this->thumb;
- }
-
- function showLink() {
- $this->out->elementStart('a', $this->linkAttr());
- $this->showRepresentation();
- $this->out->elementEnd('a');
- }
-
- /**
- * Build HTML attributes for the link
- * @return array
- */
- function linkAttr()
- {
- $attr = parent::linkAttr();
- $attr['class'] = 'attachment-thumbnail';
- return $attr;
- }
-
- /**
- * start a single notice.
- *
- * @return void
- */
- function showStart()
- {
- // XXX: RDFa
- // TODO: add notice_type class e.g., notice_video, notice_image
- $this->out->elementStart('span', array('class' => 'inline-attachment'));
- }
-
- /**
- * finish the notice
- *
- * Close the last elements in the notice list item
- *
- * @return void
- */
- function showEnd()
- {
- $this->out->elementEnd('span');
- }
-}