Class Definition

Update an object brick definition by key

Changed on

Update an existing object brick definition by its unique <strong>{key}</strong>. <br> The <strong>{key}</strong> must be the key of an existing object brick definition.

put/pimcore-studio/api/class/object-brick/{key}

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /pimcore-studio/api/class/object-brick/{key}
  • Auth: none declared

Path parameters

keystring required
Example:MyObjectBrick

Object brick unique key

Request body

configurationobject required

Layout configuration for fields (Panel, Input, ..)

valuesobject required

Values for object brick definition metadata

Example request

{
  "configuration": {
    "children": [
      {
        "name": "Layout",
        "datatype": "layout",
        "fieldtype": "panel",
        "type": null,
        "region": "",
        "title": "Pattern",
        "width": "",
        "height": "",
        "collapsible": false,
        "collapsed": false,
        "bodyStyle": "",
        "locked": false,
        "layout": "",
        "border": false,
        "icon": null,
        "labelWidth": 100,
        "labelAlign": "left",
        "invalidFieldError": null,
        "children": [
          {
            "name": "count",
            "datatype": "data",
            "fieldtype": "numeric",
            "title": "Token Count",
            "tooltip": "",
            "mandatory": false,
            "noteditable": false,
            "index": false,
            "locked": false,
            "style": "",
            "permissions": null,
            "relationType": false,
            "invisible": false,
            "visibleGridView": false,
            "visibleSearch": false,
            "defaultValue": null,
            "integer": true,
            "unsigned": true,
            "minValue": 1,
            "maxValue": null,
            "unique": false,
            "decimalSize": null,
            "decimalPrecision": null,
            "width": 400,
            "defaultValueGenerator": "",
            "invalidFieldError": null,
            "children": null
          }
        ]
      }
    ]
  },
  "values": {
    "parentClass": "\\App\\Bundle\\Model\\MyCustomParentType",
    "implementsInterfaces": "",
    "title": "",
    "group": "Voucher",
    "classDefinitions": [
      {
        "classname": "Product",
        "fieldname": "myBrickField"
      }
    ],
    "blockedVarsForExport": []
  }
}

Response

Updated object brick definition detail

additionalAttributesobject

AdditionalAttributes

keystring required

Key

titlestring nullable required

Title

groupstring nullable required

Group

parentClassstring nullable required

Namespace of parent class

implementsInterfacesstring nullable required

Interface implementations

blockedVarsForExportstring[] required

Blocked variables for export

isWriteableboolean required

Whether the object brick definition can be written to

Example response

{
  "key": "MyObjectBrick",
  "title": "My Object Brick",
  "group": "system",
  "parentClass": "App\\Model\\DataObject\\ObjectBrick",
  "implementsInterfaces": "App\\Model\\DataObject\\Interface",
  "blockedVarsForExport": [],
  "isWriteable": true,
  "classDefinitions": [
    {
      "classname": "fieldTest",
      "fieldname": "myBrickField"
    }
  ]
}

Changes