IMP_Contents::linkView PHP Method

linkView() public method

Generate a link to the download/view page.
public linkView ( Horde_Mime_Part $mime_part, integer $actionID, string $text, array $options = [] ) : string
$mime_part Horde_Mime_Part The MIME part to view.
$actionID integer The actionID value.
$text string The ESCAPED (!) link text.
$options array Additional parameters:
  - attr: (array) Additional attributed to set on the link.
  - class: (string) The CSS class to use.
  - jstext: (string) The JS text to use.
  - params: (array) A list of any additional parameters that need to be
            passed to the download/view page.
return string A HTML href link to the download/view page.
    public function linkView($mime_part, $actionID, $text, $options = array())
    {
        $options = array_merge(array('attr' => array(), 'class' => null, 'jstext' => $text, 'params' => array()), $options);
        return Horde::link($this->urlView($mime_part, $actionID, $options), $options['jstext'], $options['class'], $actionID == 'download_attach' ? null : strval(new Horde_Support_Randomid()), '', '', '', $options['attr']) . $text . '</a>';
    }