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

Add noop to nodebuilder

XMLWordPrintable

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

      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()
                              )
                      )
              )
      

        Acceptance criteria

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

                Created:
                Updated:
                Resolved: