RuleEditorFactory
extends BaseComponentFactory
in package
FinalYes
Creates {@see RuleEditor} instances; called from the presenter Multiplier (key = `ruleId`).
AppContext is injected by a decorator through setAppContext(), so the constructor does
not call the parent constructor.
Table of Contents
Properties
- $appContext : AppContext
- $control : BaseComponent|null
- $parameterManager : ParameterManager
- $parameterRuleManager : ParameterRuleManager
- $pickerFactory : PickerFactory
Methods
- __construct() : mixed
- create() : RuleEditor
- getAppContext() : AppContext
- getControl() : BaseComponent
- initControl() : void
- initializeAllContexts() : void
- setAppContext() : $this
- initialized() : T
- Stores the component as `$control`, initializes it and returns it with its concrete type (so `create(): Cart` does not return the generic `?BaseComponent` property).
Properties
$appContext
protected
AppContext
$appContext
$control
protected
BaseComponent|null
$control
= null
$parameterManager read-only
private
ParameterManager
$parameterManager
$parameterRuleManager read-only
private
ParameterRuleManager
$parameterRuleManager
$pickerFactory read-only
private
PickerFactory
$pickerFactory
Methods
__construct()
public
__construct(ParameterRuleManager $parameterRuleManager, ParameterManager $parameterManager, PickerFactory $pickerFactory) : mixed
Parameters
- $parameterRuleManager : ParameterRuleManager
- $parameterManager : ParameterManager
- $pickerFactory : PickerFactory
create()
public
create(int $ruleId, int $selectId[, string $modalId = RuleEditor::DEFAULT_MODAL_ID ]) : RuleEditor
Parameters
- $ruleId : int
- $selectId : int
- $modalId : string = RuleEditor::DEFAULT_MODAL_ID
Return values
RuleEditorgetAppContext()
public
getAppContext() : AppContext
Return values
AppContextgetControl()
public
getControl() : BaseComponent
Return values
BaseComponentinitControl()
public
initControl() : void
initializeAllContexts()
public
initializeAllContexts() : void
setAppContext()
public
setAppContext(AppContext $appContext) : $this
Parameters
- $appContext : AppContext
Return values
$thisinitialized()
Stores the component as `$control`, initializes it and returns it with its concrete type (so `create(): Cart` does not return the generic `?BaseComponent` property).
protected
initialized(T $control) : T
Parameters
- $control : T