original_string: private function render_toolbar_button($icon, $tool, $accesskey = null, $disabled=false) {
  
          // Build button alt text.
          $alttext = new stdClass();
          $alttext->tool = get_string($tool, 'assignfeedback_editpdf');
          if (!empty($accesskey)) {
              $alttext->shortcut = '(Alt/Shift-Alt/Ctrl-Option + ' . $accesskey . ')';
          } else {
              $alttext->shortcut = '';
          }
          $iconalt = get_string('toolbarbutton', 'assignfeedback_editpdf', $alttext);
  
          $iconhtml = $this->image_icon($icon, $iconalt, 'assignfeedback_editpdf');
          $iconparams = array('data-tool'=>$tool, 'class'=>$tool . 'button');
          if ($disabled) {
              $iconparams['disabled'] = 'true';
          }
          if (!empty($accesskey)) {
              $iconparams['accesskey'] = $accesskey;
          }
  
          return html_writer::tag('button', $iconhtml, $iconparams);
      }
code: private function render_toolbar_button($icon, $tool, $accesskey = null, $disabled=false) {
  
          // Build button alt text.
          $alttext = new stdClass();
          $alttext->tool = get_string($tool, 'assignfeedback_editpdf');
          if (!empty($accesskey)) {
              $alttext->shortcut = '(Alt/Shift-Alt/Ctrl-Option + ' . $accesskey . ')';
          } else {
              $alttext->shortcut = '';
          }
          $iconalt = get_string('toolbarbutton', 'assignfeedback_editpdf', $alttext);
  
          $iconhtml = $this->image_icon($icon, $iconalt, 'assignfeedback_editpdf');
          $iconparams = array('data-tool'=>$tool, 'class'=>$tool . 'button');
          if ($disabled) {
              $iconparams['disabled'] = 'true';
          }
          if (!empty($accesskey)) {
              $iconparams['accesskey'] = $accesskey;
          }
  
          return html_writer::tag('button', $iconhtml, $iconparams);
      }
code_tokens: private function render_toolbar_button ( $ icon , $ tool , $ accesskey = null , $ disabled = false ) { // Build button alt text. $ alttext = new stdClass ( ) ; $ alttext -> tool = get_string ( $ tool , 'assignfeedback_editpdf' ) ; if ( ! empty ( $ accesskey ) ) { $ alttext -> shortcut = '(Alt/Shift-Alt/Ctrl-Option + ' . $ accesskey . ')' ; } else { $ alttext -> shortcut = '' ; } $ iconalt = get_string ( 'toolbarbutton' , 'assignfeedback_editpdf' , $ alttext ) ; $ iconhtml = $ this -> image_icon ( $ icon , $ iconalt , 'assignfeedback_editpdf' ) ; $ iconparams = array ( 'data-tool' => $ tool , 'class' => $ tool . 'button' ) ; if ( $ disabled ) { $ iconparams [ 'disabled' ] = 'true' ; } if ( ! empty ( $ accesskey ) ) { $ iconparams [ 'accesskey' ] = $ accesskey ; } return html_writer :: tag ( 'button' , $ iconhtml , $ iconparams ) ; }
docstring: Render a single colour button.
  
  @param string $icon - The key for the icon
  @param string $tool - The key for the lang string.
  @param string $accesskey Optional - The access key for the button.
  @param bool $disabled Optional - Is this button disabled.
  @return string
docstring_tokens: Render a single colour button .