code: function () {
          var self = this;
  
          function activateMenuItemsByValue(menu, value) {
            if (menu instanceof Menu) {
              menu.items().each(function (ctrl) {
                if (!ctrl.hasMenus()) {
                  ctrl.active(ctrl.value() === value);
                }
              });
            }
          }
  
          function getSelectedItem(menuValues, value) {
            var selectedItem;
  
            if (!menuValues) {
              return;
            }
  
            for (var i = 0; i < menuValues.length; i++) {
              if (menuValues[i].value === value) {
                return menuValues[i];
              }
  
              if (menuValues[i].menu) {
                selectedItem = getSelectedItem(menuValues[i].menu, value);
                if (selectedItem) {
                  return selectedItem;
                }
              }
            }
          }
  
          self.on('show', function (e) {
            activateMenuItemsByValue(e.control, self.value());
          });
  
          self.state.on('change:value', function (e) {
            var selectedItem = getSelectedItem(self.state.get('menu'), e.value);
  
            if (selectedItem) {
              self.text(selectedItem.text);
            } else {
              self.text(self.settings.text);
            }
          });
  
          return self._super();
        }
docs: Getter/setter function for the control value.
  
  @method value
  @param {String} [value] Value to be set.
  @return {Boolean/tinymce.ui.ListBox} Value or self if it's a set operation.