Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3276

Add noop to nodebuilder

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 4.4
    • None
    • core
    • None

    Description

      When using the node builder api, we sometimes want to use ternary operations, where a noop() would be useful.
      Example:

      new ModuleNodeBuilderTask("test paragraph", "", ErrorHandling.strict,
                      getNode("paragraphs").then(
                              addNode(name, "mgnl:contentNode").then(
                                      addProperty("templatePath", templatePath),
                                      addProperty("type", type),
                                      modelClass != null ? addProperty("modelClass", modelClass.getName()) : noop()
                              )
                      )
              )
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                gjoseph Magnolia International
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: