-
-
Notifications
You must be signed in to change notification settings - Fork 239
Expand file tree
/
Copy pathcreate.php
More file actions
20 lines (16 loc) · 635 Bytes
/
create.php
File metadata and controls
20 lines (16 loc) · 635 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
// Decide which layout we should be rendering
$layout = $this->formLayout ?? $formConfig->formLayout ?? null;
if (!in_array($layout, ['standard', 'sidebar', 'fancy'])) {
$layout = 'standard';
}
// If required, set the appropriate body classes
$this->bodyClass = match ($layout) {
'fancy' => 'fancy-layout compact-container breadcrumb-flush breadcrumb-fancy',
'sidebar' => 'compact-container',
default => '',
};
// Define layout mode view path for inclusion
$this->appendViewPath(sprintf('%s/create/%s', __DIR__, $layout));
// Render the form layout
echo $this->makePartial(sprintf('create/%s.php', $layout));