public function _getMessageTextCallback($id, $attribute, $node) { if ($part = $this->getMetadata('related_contents')->getMimePart($id)) { $atc = $this->addAttachmentFromPart($part); $this->addRelatedAttachment($atc, $node, $attribute); return $atc->viewUrl(); } return $node->getAttribute($attribute); }