destructiveControls(user) {
    const items = new ItemList();

    if (user.id() !== '1' && user.canDelete()) {
      items.add('delete', Button.component({
        icon: 'fas fa-times',
        children: app.translator.trans('core.forum.user_controls.delete_button'),
        onclick: this.deleteAction.bind(user)
      }));
    }

    return items;
  }
/**
   * Get controls for a user which are destructive (e.g. delete).
   *
   * @param {User} user
   * @param {*} context The parent component under which the controls menu will
   *     be displayed.
   * @return {ItemList}
   * @protected
   */
Get controls for a user which are destructive .
@param {User} user
@param {*} context The parent component under which the controls menu will
be displayed.
Get controls for a user which are destructive . @param { User } user @param { * } context The parent component under which the controls menu will be displayed .
destructiveControls(user) {
    const items = new ItemList();
    if (user.id() !== '1' && user.canDelete()) {
      items.add('delete', Button.component({
        icon: 'fas fa-times',
        children: app.translator.trans('core.forum.user_controls.delete_button'),
        onclick: this.deleteAction.bind(user)
      }));
    }
    return items;
  }
destructiveControls ( user ) { const items = new ItemList ( ) ; if ( user . id ( ) !== '1' && user . canDelete ( ) ) { items . add ( 'delete' , Button . component ( { icon : 'fas fa-times' , children : app . translator . trans ( 'core.forum.user_controls.delete_button' ) , onclick : this . deleteAction . bind ( user ) } ) ) ; } return items ; }
Get controls for a user which are destructive (e.g.
Get controls for a user which are destructive ( e . g .