124 if ($this->
alias === null) {
125 throw new Exception(
'Set an alias before using the builder');
137 $this->module->setAlias($this->
getAlias());
147 $this->module->setPermissions(
148 $this->permissionRepository->forModule($this->getAlias())
159 $this->module->setName(
160 $this->config->get($this->getAlias().
'.name')
171 $this->module->setDescription(
172 $this->config->get($this->getAlias().
'.description')
183 $this->module->setSettings(
184 (
new VFGTransformer)->transformToArray(
185 $this->moduleSettingsStore->get($this->getAlias())
197 $this->module->setTriggers(
198 array_filter($this->eventRepository
201 return in_array(TriggerableEvent::class, class_implements($event[
'event']));
213 $this->module->setServices([
214 'required' => $this->serviceRequest->getRequired($this->getAlias()),
215 'optional' => $this->serviceRequest->getOptional($this->getAlias())
226 $this->module->setFor(
227 $this->config->get($this->getAlias().
'.for',
'user')
248 $this->module->setCompletionConditions(
249 collect($this->completionConditionRepository->getAllForModule($this->getAlias()))->toArray()
setCompletionConditions()
$completionConditionRepository
__construct(ModuleContract $module, PermissionRepository $permissionRepository, Repository $config, EventRepository $eventRepository, CompletionConditionRepository $completionConditionRepository, ModuleSettingsStore $moduleSettingsStore, ServiceRequest $serviceRequest)