>
22 | */
23 | protected array $elementSanitizers = [
24 | 'svg' => SvgSanitizer::class,
25 | ];
26 | }
27 |
--------------------------------------------------------------------------------
/formwork/src/Sanitizer/Parser/DomParserInterface.php:
--------------------------------------------------------------------------------
1 | dom = new HTML5();
16 | }
17 |
18 | public function parse(string $string): ?DOMDocumentFragment
19 | {
20 | return $this->dom->loadHTMLFragment($string);
21 | }
22 |
23 | public function serialize(?DOMNode $domNode = null): string
24 | {
25 | return $this->dom->saveHTML($domNode);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/formwork/src/Sanitizer/SanitizeElementsMethod.php:
--------------------------------------------------------------------------------
1 | $data
17 | */
18 | public function make(string $id, array $data = []): Scheme
19 | {
20 | return $this->container->build(Scheme::class, compact('id', 'data'));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/formwork/src/Schemes/SchemeOptions.php:
--------------------------------------------------------------------------------
1 | $data
16 | */
17 | public function __construct(array $data)
18 | {
19 | $this->data = $data;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/formwork/src/Services/Exceptions/ServiceResolutionException.php:
--------------------------------------------------------------------------------
1 | loadFromPath(SYSTEM_PATH . '/config/', defaultConfig: true);
16 | $config->loadFromPath(ROOT_PATH . '/site/config/');
17 |
18 | $config->resolve([
19 | '%ROOT_PATH%' => ROOT_PATH,
20 | '%SYSTEM_PATH%' => SYSTEM_PATH,
21 | ]);
22 |
23 | date_default_timezone_set($config->get('system.date.timezone'));
24 |
25 | return $config;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/formwork/src/Services/Loaders/SiteServiceLoader.php:
--------------------------------------------------------------------------------
1 | config->get('site');
19 |
20 | return $container->build(Site::class, ['data' => [
21 | ...$config,
22 | 'contentPath' => $this->config->get('system.pages.path'),
23 | ]]);
24 | }
25 |
26 | /**
27 | * @param Site $service
28 | */
29 | public function onResolved(object $service, Container $container): void
30 | {
31 | $service->load();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/formwork/src/Services/ResolutionAwareServiceLoaderInterface.php:
--------------------------------------------------------------------------------
1 | 'light',
18 | self::Dark => 'dark',
19 | self::Auto => 'light dark',
20 | };
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/formwork/src/Users/Exceptions/AuthenticationFailedException.php:
--------------------------------------------------------------------------------
1 | id;
23 | }
24 |
25 | /**
26 | * Return role title
27 | */
28 | public function title(): string
29 | {
30 | return Str::interpolate($this->title, fn($key) => $this->translations->getCurrent()->translate($key));
31 | }
32 |
33 | /**
34 | * Return image path
35 | */
36 | public function permissions(): Permissions
37 | {
38 | return $this->permissions;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/formwork/src/Users/RoleCollection.php:
--------------------------------------------------------------------------------
1 | $data
17 | */
18 | public function make(array $data, Role $role): User
19 | {
20 | return $this->container->build(User::class, compact('data', 'role'));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/formwork/src/Users/Users.php:
--------------------------------------------------------------------------------
1 | insert('errors.partials.header') ?>
2 | Oops, something went wrong!
3 | Formwork encountered an error while serving your request.
If you are the maintainer of this site, please check Formwork configuration or the server log for errors.
4 | Report an issue to GitHub
5 |
6 | insert('errors.partials.debug') ?>
7 |
8 | insert('errors.partials.footer') ?>
9 |
--------------------------------------------------------------------------------
/formwork/views/errors/install.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | The site is currently offline
due to technical problems
4 | If you are the maintainer of this site, please run composer install
. Composer autoloader was not found.
5 |
--------------------------------------------------------------------------------
/formwork/views/errors/maintenance.php:
--------------------------------------------------------------------------------
1 | insert('errors.partials.header') ?>
2 | We are coming back soon
3 | The website is currently in maintenance mode.
4 | insert('errors.partials.footer') ?>
--------------------------------------------------------------------------------
/formwork/views/errors/panel/assets.php:
--------------------------------------------------------------------------------
1 |
2 | The administration panel is currently offline due to technical problems
3 | Required panel assets were not found. If you are the maintainer of this site, please run cd panel; yarn install && yarn build
4 |
--------------------------------------------------------------------------------
/formwork/views/errors/partials/footer.php:
--------------------------------------------------------------------------------
1 |
2 |