LayoutMgr.evalNewLayout (param, creator)
create a new Layout based on a chosen parent layout

  • Parameter Object:
    Object containing the submitted form values
  • Parameter Object:
    Creator of the layout object
Sourcecode in LayoutMgr/objectFunctions.js:
1:   function evalNewLayout(param, creator) {
2:      var newLayout = new Layout(this._parent instanceof Site ? this._parent : null,
3:                                 "untitled", creator);
4:      if (param.layout) {
5:         var parentLayout = root.layouts.get(param.layout);
6:         if (!parentLayout)
7:            throw new Exception("layoutParentNotFound");
8:         newLayout.setParentLayout(parentLayout);
9:         newLayout.title = parentLayout.title;
10:     }
11:     newLayout.alias = buildAlias(newLayout.title, this);
12:     if (!this.add(newLayout))
13:        throw new Exception("layoutCreate");
14:     return new Message("layoutCreate", newLayout.title, newLayout);
15:  }