function _getItems() {
  var itemsPattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  var defaultPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  var items = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  var result = [];
  var pattern = itemsPattern;

  if (pattern && pattern.items) {
    pattern = pattern.items;
  } else if (!Array.isArray(pattern)) {
    pattern = defaultPattern;
  }

  if ((0, _object.isObject)(pattern)) {
    (0, _object.objectEach)(pattern, function (value, key) {
      var item = items[typeof value === 'string' ? value : key];

      if (!item) {
        item = value;
      }

      if ((0, _object.isObject)(value)) {
        (0, _object.extend)(item, value);
      } else if (typeof item === 'string') {
        item = {
          name: item
        };
      }

      if (item.key === void 0) {
        item.key = key;
      }

      result.push(item);
    });
  } else {
    (0, _array.arrayEach)(pattern, function (name, key) {
      var item = items[name]; // Item deleted from settings `allowInsertRow: false` etc.

      if (!item && _predefinedItems.ITEMS.indexOf(name) >= 0) {
        return;
      }

      if (!item) {
        item = {
          name: name,
          key: "".concat(key)
        };
      }

      if ((0, _object.isObject)(name)) {
        (0, _object.extend)(item, name);
      }

      if (item.key === void 0) {
        item.key = key;
      }

      result.push(item);
    });
  }

  return result;
}
Get all menu items based on pattern.

@param {Array|Object|Boolean} pattern Pattern which you can define by displaying menu items order. If `true` default
                                      pattern will be used.
@returns {Array}