\CGProductBuilderDispositionHandler

A class to manage and interact with dispositions.

Summary

Methods
Properties
Constants
register_disposition()
unregister_module_dispositions()
unregister_disposition_class()
get_registered_classes()
get_dispositions()
get_disposition_list()
get_ready_disposition_list()
get_disposition()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

register_disposition()

register_disposition(string $module, string $classname)

Register a disposition.

The class name must be unique to all registered dispositions. It is recommended that namespaces be used. This method will try to instantiate the class specified to ensure that it can be loaded properly.

Parameters

string $module

The module that contains this disposition.

string $classname

The name of the class. The class must be derived from \CGProductBuilder\disposition

unregister_module_dispositions()

unregister_module_dispositions(string $module)

Unregister all dispositions registered for a specific module.

Parameters

string $module

unregister_disposition_class()

unregister_disposition_class(string $class)

Un-register a specific disposition by its calss name.

Parameters

string $class

get_registered_classes()

get_registered_classes() : string[]

Get the list of registered classes.

Returns

string[]

get_dispositions()

get_dispositions() : \CGProductBuilder\disposition[]

Get all of the registered dispositions.

Returns

\CGProductBuilder\disposition[]

get_disposition_list()

get_disposition_list(bool $all) : array

Get a list (suitable for use in dropdowns) of dispositions.

The keys of the returned array are the class names. The values are disposition friendly names. Only those dispositions deemed as 'compatible' with the current install will be returned.

Parameters

bool $all

Wether or not to return all dispositions, compatible or not.

Returns

array

get_ready_disposition_list()

get_ready_disposition_list() : array

Get a list of dispositions that are ready,and can be used for disposing of the current form.

Returns

array

get_disposition()

get_disposition(string|string[] $classnames) : \CGProductBuilder\disposition|\CGProductBuilder\disposition[]

Get dispositions matching the class name or class names supplied.

Parameters

string|string[] $classnames

Returns

\CGProductBuilder\disposition|\CGProductBuilder\disposition[]