original_string: public function getTokenEmailLink($tokenId, $tokenStatus, $canMail)
      {
          if ($canMail && ('O' == $tokenStatus || 'P' == $tokenStatus)) {
              $menuItem = $this->_getEmailMenuItem();
  
              $link = $menuItem->toActionLinkLower([
                  'gto_id_token' => $tokenId,
                  'can_be_taken' => 1,
                  'can_email'    => 1,
                  \Gems_Model::ID_TYPE => 'token',
              ]);
  
              if ($link) {
                  $link->title = sprintf($this->_('Send email for token %s'), strtoupper($tokenId));
  
                  return $link;
              }
          }
      }
code: public function getTokenEmailLink($tokenId, $tokenStatus, $canMail)
      {
          if ($canMail && ('O' == $tokenStatus || 'P' == $tokenStatus)) {
              $menuItem = $this->_getEmailMenuItem();
  
              $link = $menuItem->toActionLinkLower([
                  'gto_id_token' => $tokenId,
                  'can_be_taken' => 1,
                  'can_email'    => 1,
                  \Gems_Model::ID_TYPE => 'token',
              ]);
  
              if ($link) {
                  $link->title = sprintf($this->_('Send email for token %s'), strtoupper($tokenId));
  
                  return $link;
              }
          }
      }
code_tokens: public function getTokenEmailLink ( $ tokenId , $ tokenStatus , $ canMail ) { if ( $ canMail && ( 'O' == $ tokenStatus || 'P' == $ tokenStatus ) ) { $ menuItem = $ this -> _getEmailMenuItem ( ) ; $ link = $ menuItem -> toActionLinkLower ( [ 'gto_id_token' => $ tokenId , 'can_be_taken' => 1 , 'can_email' => 1 , \ Gems_Model :: ID_TYPE => 'token' , ] ) ; if ( $ link ) { $ link -> title = sprintf ( $ this -> _ ( 'Send email for token %s' ) , strtoupper ( $ tokenId ) ) ; return $ link ; } } }
docstring: Generate a menu link for email screen
  
  @param string $tokenId
  @param string $tokenStatus
  @param boolean $canMail
  @return \MUtil_Html_AElement
docstring_tokens: Generate a menu link for email screen