/**
  * Draw the permission with icon and title.
  * Adds the icon to the title. This is done when drawn so that the icon
  * calculation is not done if the form is only being submitted.
  * @param PRIVILEGE_MAP $map Information about the privilege.
  * @param PERMISSIONS_FORMATTER $formatter Use this to get formatting information.
  * @param FORM_RENDERER $renderer
  * @access private
  */
 protected function _draw_permission($map, $formatter, $renderer)
 {
     $id = $map->id();
     $field = $this->field_at($id);
     $field->caption = $this->context->get_icon_with_text($formatter->icon_url_for($map), Sixteen_px, $formatter->title_for($map));
     echo $renderer->check_box_as_HTML($id);
 }
 /**
  * Draw the permission with icon and title.
  * Adds the icon to the title. This is done when drawn so that the icon
  * calculation is not done if the form is only being submitted.
  * @param PRIVILEGE_MAP $map Information about the privilege.
  * @param PERMISSIONS_FORMATTER $formatter Use this to get formatting information.
  * @param FORM_RENDERER $renderer
  * @param FORM_LIST_PROPERTIES $props
  * @access private
  */
 protected function _draw_tri_permission($map, $formatter, $renderer, $props)
 {
     $id = $map->id();
     $field = $this->field_at($id);
     $field->caption = $this->context->get_icon_with_text($formatter->icon_url_for($map), Sixteen_px, $formatter->title_for($map));
     $renderer->start_row();
     echo $renderer->drop_down_as_HTML($id, $props);
     echo $renderer->label_as_html($id);
     $renderer->finish_row();
 }