code: function () {
          var self = this, elm = self.getEl(), parent = self.parent(), newItems, i;
  
          if (self.items) {
            var controls = self.items().toArray();
            i = controls.length;
            while (i--) {
              controls[i].remove();
            }
          }
  
          if (parent && parent.items) {
            newItems = [];
  
            parent.items().each(function (item) {
              if (item !== self) {
                newItems.push(item);
              }
            });
  
            parent.items().set(newItems);
            parent._lastRect = null;
          }
  
          if (self._eventsRoot && self._eventsRoot == self) {
            $(elm).off();
          }
  
          var lookup = self.getRoot().controlIdLookup;
          if (lookup) {
            delete lookup[self._id];
          }
  
          if (elm && elm.parentNode) {
            elm.parentNode.removeChild(elm);
          }
  
          self.state.set('rendered', false);
          self.state.destroy();
  
          self.fire('remove');
  
          return self;
        }
docs: Removes the current control from DOM and from UI collections.
  
  @method remove
  @return {tinymce.ui.Control} Current control instance.