code: public String getPreferencesButton() {
  
          int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle();
          if (!getCms().getRequestContext().getCurrentUser().isManaged()) {
              return button(
                  "../commons/preferences.jsp",
                  "body",
                  "preferences.png",
                  Messages.GUI_BUTTON_PREFERENCES_0,
                  buttonStyle);
          } else {
              return button(null, null, "preferences_in.png", Messages.GUI_BUTTON_PREFERENCES_0, buttonStyle);
          }
      }
docs: Returns the html for the "preferences" button depending on the current users permissions and
  the default workplace settings.<p>
  
  @return the html for the "preferences" button