original_string: public function col_unsubscribe(\tool_monitor\subscription $sub) {
          global $OUTPUT, $CFG;
  
          $deleteurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/index.php', array('subscriptionid' => $sub->id,
                  'action' => 'unsubscribe', 'courseid' => $this->courseid, 'sesskey' => sesskey()));
          $icon = $OUTPUT->render(new \pix_icon('t/delete', get_string('deletesubscription', 'tool_monitor')));
  
          return \html_writer::link($deleteurl, $icon, array('class' => 'action-icon'));
      }
code: public function col_unsubscribe(\tool_monitor\subscription $sub) {
          global $OUTPUT, $CFG;
  
          $deleteurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/index.php', array('subscriptionid' => $sub->id,
                  'action' => 'unsubscribe', 'courseid' => $this->courseid, 'sesskey' => sesskey()));
          $icon = $OUTPUT->render(new \pix_icon('t/delete', get_string('deletesubscription', 'tool_monitor')));
  
          return \html_writer::link($deleteurl, $icon, array('class' => 'action-icon'));
      }
code_tokens: public function col_unsubscribe ( \ tool_monitor \ subscription $ sub ) { global $ OUTPUT , $ CFG ; $ deleteurl = new \ moodle_url ( $ CFG -> wwwroot . '/admin/tool/monitor/index.php' , array ( 'subscriptionid' => $ sub -> id , 'action' => 'unsubscribe' , 'courseid' => $ this -> courseid , 'sesskey' => sesskey ( ) ) ) ; $ icon = $ OUTPUT -> render ( new \ pix_icon ( 't/delete' , get_string ( 'deletesubscription' , 'tool_monitor' ) ) ) ; return \ html_writer :: link ( $ deleteurl , $ icon , array ( 'class' => 'action-icon' ) ) ; }
docstring: Generate content for unsubscribe column.
  
  @param \tool_monitor\subscription $sub subscription object
  @return string html used to display the unsubscribe field.
docstring_tokens: Generate content for unsubscribe column .