Edit this topic

Part handler dispatch

: shell

: shape-handler

: content

: /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. Part handlers take a context object and a callback function.

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.

PartHandlerDispatch.handle(context, done)

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

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.