public _getMessageTextCallback ( $id, $attribute, $node ) : string | ||
Результат | string | Replacement text. |
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);
}