Plentymarkets interface documentation

EventProcedures

Events

EventProceduresTriggered

plentymarkets event procedures triggered

Namespace

Plenty\Modules\EventProcedures\Events

Methods
public getTicket():Plenty\Modules\Ticket\Models\Ticket
Return type: Ticket

Gets the ticket.

public getOrder():Plenty\Modules\Order\Models\Order
Return type: Order

Gets the order

Services

EventProceduresService

The EventProcedureService class offers the possibility to register a procedure class and method that can be called by plentymarkets event procedures.

Namespace

Plenty\Modules\EventProcedures\Services

Methods
public registerProcedure($moduleName, $eventType, $procedureNames, $procedureClass, $procedureGroup = \Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry::PROCEDURE_GROUP_ORDER):bool

Register a procedure class

Parameters

Name

Type

Description

$moduleName

string

The name of the module. The name of the module can be choosen freely.

$eventType

string

The name of the event type. The event types are determined and can be one of the following: <ul> <li> {@see \ProcedureEntry::EVENT_TYPE_ORDER}, </li> <li> {@see \ProcedureEntry::EVENT_TYPE_REORDER} or </li> <li> {@see \ProcedureEntry::EVENT_TYPE_TICKET} </li> </ul>

$procedureNames

array

The name for the procedure that will be shown in the event procedure UI. The name is unique and will be used for German and English.

$procedureClass

string

The fully qualified name of the procedure class to be called by event procedures. Each procedure class must either contain the execute method defined by plentymarkets or can contain an individual method. The individual method has to be provided along with procedure class. The method is separated from the class by an "@" sign. The part following the "@" will be interpreted as method name. The part in front of the "@" is the name of the procedure class.

$procedureGroup

string

The name of the procedure group. The procedure groups are determined and can be one of the following: <ul> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_ORDER}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_ITEM}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_DOCUMENT}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_CONTACT}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_SHIPPING}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_PAYMENT}, </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_RETURN} or </li> <li> {@see \ProcedureEntry::PROCEDURE_GROUP_LISTING} </li> <li> [optional, default={@see \ProcedureEntry::PROCEDURE_GROUP_ORDER}] </li> </ul>

public registerFilter($moduleName, $eventType, $filterNames, $filterClass):bool

Register a filter class

Parameters

Name

Type

Description

$moduleName

string

The name of the module. The name of the module can be choosen freely.

$eventType

string

The name of the event type. The event types are determined and can be one of the following: <ul> <li>order</li> <li>ticket</li> </ul>

$filterNames

array

The name for the filter that will be shown in the event procedure UI. The name is unique and will be used for German and English.

$filterClass

string

The fully qualified name of the filter class to be called by event procedures. Each procedure class must either contain the accept method defined by plentymarkets or can contain an individual method. The individual method has to be provided along with procedure class. The method is separated from the class by an "@" sign. The part following the "@" will be interpreted as method name. The part in front of the "@" is the name of the procedure class. The method must return a boolean.

public registerTrigger($moduleName, $eventType, $triggerIdentifier, $triggerNames):bool

Register a trigger

Parameters

Name

Type

Description

$moduleName

string

The name of the module. The name of the module can be choosen freely.

$eventType

string

The name of the event type. The event types are determined and can be one of the following: <ul> <li> order </li> </ul>

$triggerIdentifier

string

The identifier for the trigger that will be used to identify the trigger on fire. The identifier of the trigger can be choosen freely.

$triggerNames

array

The name for the trigger that will be shown in the event procedure UI. The name is unique and will be used for German and English.

public fireTrigger($orderId, $moduleName, $triggerIdentifier):void

Fire a trigger

Parameters

Name

Type

Description

$orderId

int

The id of the order for which the trigger is fired.

$moduleName

string

The name of the module. The name of the module given on register the trigger.

$triggerIdentifier

string

The identifier for the trigger given on register the trigger.

Services

Entries

FilterEntry

The filter entry contains all information needed to use module filters in plentymarkets event procedures.

Namespace

Plenty\Modules\EventProcedures\Services\Entries

Methods
public getModuleName():string

Gets the module name.

public setModuleName($moduleName):Plenty\Modules\EventProcedures\Services\Entries\FilterEntry
Return type: FilterEntry

Sets the module name

Parameters

Name

Type

Description

$moduleName

string

public getEventType():string

Gets the type of event for the current filter entry.

public setEventType($eventType):Plenty\Modules\EventProcedures\Services\Entries\FilterEntry
Return type: FilterEntry

Sets the event type

Parameters

Name

Type

Description

$eventType

string

public getFilterNames():array

Gets the filter names

public setFilterNames($filterNames):Plenty\Modules\EventProcedures\Services\Entries\FilterEntry
Return type: FilterEntry

Sets the filter names

Parameters

Name

Type

Description

$filterNames

array

public getFilterClass():string

Gets the filter class

public setFilterClass($filterClass):Plenty\Modules\EventProcedures\Services\Entries\FilterEntry
Return type: FilterEntry

Sets the filter class

Parameters

Name

Type

Description

$filterClass

string

ProcedureEntry

The procedure entry contains all information needed to use module procedures in plentymarkets event procedures.

Namespace

Plenty\Modules\EventProcedures\Services\Entries

Methods
public getModuleName():string

Gets the module name

public setModuleName($moduleName):Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry
Return type: ProcedureEntry

Sets the module name

Parameters

Name

Type

Description

$moduleName

string

public getEventType():string

Gets the event type

public setEventType($eventType):Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry
Return type: ProcedureEntry

Sets the event type

Parameters

Name

Type

Description

$eventType

string

public getProcedureNames():array

Gets the procedure names

public setProcedureNames($procedureNames):Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry
Return type: ProcedureEntry

Sets the procedure names

Parameters

Name

Type

Description

$procedureNames

array

public getProcedureGroup():string

Gets the procedure group

public setProcedureGroup($procedureGroup):Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry
Return type: ProcedureEntry

Sets the procedure group

Parameters

Name

Type

Description

$procedureGroup

string

public getProcedureClass():string

Gets the procedure class

public setProcedureClass($procedureClass):Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry
Return type: ProcedureEntry

Sets the procedure class

Parameters

Name

Type

Description

$procedureClass

string

TriggerEntry

The trigger entry contains all information needed to use module triggers in plentymarkets event procedures.

Namespace

Plenty\Modules\EventProcedures\Services\Entries

Methods
public getModuleName():string

Gets the module name

public setModuleName($moduleName):Plenty\Modules\EventProcedures\Services\Entries\TriggerEntry
Return type: TriggerEntry

Sets the module name

Parameters

Name

Type

Description

$moduleName

string

public getEventType():string

Gets the event type

public setEventType($eventType):Plenty\Modules\EventProcedures\Services\Entries\TriggerEntry
Return type: TriggerEntry

Sets the event type

Parameters

Name

Type

Description

$eventType

string

public getTriggerIdentifier():string

Gets the trigger identifier

public setTriggerIdentifier($triggerIdentifier):Plenty\Modules\EventProcedures\Services\Entries\TriggerEntry
Return type: TriggerEntry

Sets the trigger identifier

Parameters

Name

Type

Description

$triggerIdentifier

string

public getTriggerNames():array

Gets the trigger names

public setTriggerNames($triggerNames):Plenty\Modules\EventProcedures\Services\Entries\TriggerEntry
Return type: TriggerEntry

Sets the trigger names

Parameters

Name

Type

Description

$triggerNames

array

public getTrigger():int

Gets the trigger