injectableFactory = $injectableFactory; $this->dateTimeFactory = $dateTimeFactory; $this->aclManager = $aclManager; } public function create(bool $skipAcl = false, ?string $timeZone = null): Htmlizer { $with = []; if ($skipAcl) { $with['acl'] = null; } if ($timeZone) { $with['dateTime'] = $this->dateTimeFactory->createWithTimeZone($timeZone); } return $this->injectableFactory->createWith(Htmlizer::class, $with); } public function createNoAcl(): Htmlizer { return $this->create(true); } public function createForUser(User $user): Htmlizer { $dateTime = $this->dateTimeFactory->createWithUserTimeZone($user); $acl = $this->aclManager->createUserAcl($user); return $this->injectableFactory->createWith(Htmlizer::class, [ 'dateTime' => $dateTime, 'acl' => $acl, ]); } }