-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample2.php
More file actions
54 lines (46 loc) · 1.81 KB
/
Copy pathexample2.php
File metadata and controls
54 lines (46 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* You can capture the content with buffer output and process the components.
*/
declare(strict_types=1);
use Oscurlo\ComponentRenderer\ComponentRenderer;
use Oscurlo\ComponentRenderer\Examples\Components\Bootstrap;
include_once "../vendor/autoload.php";
$render = new ComponentRenderer();
$render->set_component_manager([
__DIR__ . "\\components" => "Layout",
"Oscurlo\\ComponentRenderer\\Examples\\Components" => [
"Container",
"Row",
"Column",
"InputField",
"TextareaField",
],
Bootstrap::class => "card",
]);
?>
<?php $render->start(); ?>
<Layout>
<Container grid="sm">
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh">
<Bootstrap::card card-title="Example 2">
<Row>
<?php for ($i = 1; $i <= 4; $i++): ?>
<Column size="12" class="col-lg-6 mb-3">
<InputField label-text="Example <?= $i ?>" type="number" class="form-control"
placeholder="Example <?= $i ?>" />
</Column>
<?php endfor; ?>
<Column size="12">
<TextareaField label-text="Textarea" placeholder="Textarea" class="form-control">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Praesentium deleniti, a
dolorum, nam ipsa dolore ipsum vel nesciunt reprehenderit quo voluptates tenetur
sapiente, similique inventore? Non inventore perspiciatis ullam repellat.
</TextareaField>
</Column>
</Row>
</Bootstrap::card>
</div>
</Container>
</Layout>
<?php $render->end(); ?>