Edit this topic

Part handler dispatch

: shell

: content

: shape-handler

: /modules/core/content/services/part-handler-dispatch.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/content/services/part-handler-dispatch.js

PartHandlerDispatch

This part handler dispatch handler calls part handlers. The part handlers must implement a service name of the form [part-type]-part-handler with a handle method that. takes a context object and a callback function. The context object has the following structure:

Param Type Description
part * The part to handle.
partName string The name of the part.
displayType string The display type.
item object The content item that the part is a part of.
shapes Array The array of shapes that the part handler can push new shapes to.
scope object The scope.

Kind: global variable

PartHandlerDispatch.handle(context, done)

Calls part handlers for each part on context.content.shape.

Kind: static method of PartHandlerDispatch

Param Type Description
context object The context object.
context.shape object The shape to handle. It has the content item for which the parts will be dispatched on its temp.item.
context.scope object The scope.
done function The callback.