EventProcedures

Events

EventProceduresTriggered

plentymarkets event procedures triggered

Namespace

Plenty\Modules\EventProcedures\Events

Methods

public getTicket():Ticket
public getOrder():Order

Get the order that triggered the event.

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(string $moduleName, string $eventType, array $procedureNames, string $procedureClass, string $procedureGroup = \Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry::PROCEDURE_GROUP_ORDER):bool

Register a procedure class

Parameters
string $moduleName The name of the module. The name of the module can be choosen freely.
string $eventType The name of the event type. The event types are determined and can be one of the following:
  • {@see \ProcedureEntry::EVENT_TYPE_ORDER},
  • {@see \ProcedureEntry::EVENT_TYPE_REORDER} or
  • {@see \ProcedureEntry::EVENT_TYPE_TICKET}
array $procedureNames 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.
string $procedureClass 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.
string $procedureGroup The name of the procedure group. The procedure groups are determined and can be one of the following:
  • {@see \ProcedureEntry::PROCEDURE_GROUP_ORDER},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_ITEM},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_DOCUMENT},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_CONTACT},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_SHIPPING},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_PAYMENT},
  • {@see \ProcedureEntry::PROCEDURE_GROUP_RETURN} or
  • {@see \ProcedureEntry::PROCEDURE_GROUP_LISTING}
  • [optional, default={@see \ProcedureEntry::PROCEDURE_GROUP_ORDER}]
public registerFilter(string $moduleName, string $eventType, array $filterNames, string $filterClass):bool

Register a filter class

Parameters
string $moduleName The name of the module. The name of the module can be choosen freely.
string $eventType The name of the event type. The event types are determined and can be one of the following:
  • order
  • ticket
array $filterNames 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.
string $filterClass 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.

Services

Entries

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

Get the

public setModuleName(string $moduleName):ProcedureEntry

Set the

Parameters
string $moduleName
public getEventType():string

Get the

public setEventType(string $eventType):ProcedureEntry

Set the

Parameters
string $eventType
public getProcedureNames():array

Get the

public setProcedureNames(array $procedureNames):ProcedureEntry

Set the

Parameters
array $procedureNames
public getProcedureGroup():string

Get the

public setProcedureGroup(string $procedureGroup):ProcedureEntry

Set the

Parameters
string $procedureGroup
public getProcedureClass():string

Get the

public setProcedureClass(string $procedureClass):ProcedureEntry

Set the

Parameters
string $procedureClass

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
public setModuleName(string $moduleName):FilterEntry
Parameters
string $moduleName
public getEventType():string
public setEventType(string $eventType):FilterEntry
Parameters
string $eventType
public getFilterNames():array
public setFilterNames(array $filterNames):FilterEntry
Parameters
array $filterNames
public getFilterClass():string
public setFilterClass(string $filterClass):FilterEntry
Parameters
string $filterClass