Skip to content

Commit

Permalink
Clean up repository
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaskill committed Feb 11, 2020
1 parent f79402a commit 1ddaae6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Locomotive Inc.
Copyright (c) Locomotive Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 26 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ $ composer require locomotivemtl/charcoal-ui

## Dependencies

- `PHP 5.5+`
- Older versions of PHP are deprecated, therefore not supported.
- PHP 7.1+
- [`psr/log`](http://www.php-fig.org/psr/psr-3/)
- A PSR-3 compliant logger should be provided to the various services / classes.
- [`locomotivemtl/charcoal-config`](https://github.com/locomotivemtl/charcoal-config) 0.6+
Expand All @@ -48,59 +47,57 @@ $ composer require locomotivemtl/charcoal-ui
## Form

```php

use \Charcoal\Config\GenericMetadata;

use \Charcoal\Ui\Form\FormBuilder;
use \Charcoal\Ui\Form\FormFactory;
use Charcoal\Config\GenericMetadata;
use Charcoal\Ui\Form\FormBuilder;
use Charcoal\Ui\Form\FormFactory;

$metadata = new GenericMetadata([
'properties' => [
'first_name' => [
'type' => 'string'
'type' => 'string',
],
'last_name' => [
'type' => 'string'
'type' => 'string',
],
'email' => [
'type' => 'email'
]
]
'type' => 'email',
],
],
]);

$formData = [
'first_name' => 'Mathieu',
'last_name' => 'Ducharme',
'email' => 'mat@locomotive.ca'
'last_name' => 'Ducharme',
'email' => 'mat@locomotive.ca',
];

$formConfig = [
'type' => 'charcoal/ui/form/generic'
'template_ident' => 'foo/bar/form',
'template_data' => [],
'label' => 'Example Form',
'groups' => [
'type' => 'charcoal/ui/form/generic'
'template_ident' => 'foo/bar/form',
'template_data' => [],
'label' => 'Example Form',
'groups' => [
'info' => [
'layout' =>[
'layout' => [
'structure' => [
'columns' => [
[1,1],
[1]
]
]
[ 1, 1 ],
[ 1 ],
],
],
],
'properties' => [
'first_name',
'last_name',
'email'
]
]
]
'email',
],
],
],
];

$formBuilder = new FormBuilder([
'form_factory' => new FormFactory(),
'view' => $container['view']
'view' => $container['view'],
]);

$form = $formBuilder->build($formConfig);
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
processIsolation="false"
stopOnFailure="false"
verbose="true">
>
<testsuites>
<testsuite name="Charcoal Test Suite">
<directory>./tests/Charcoal</directory>
Expand Down

0 comments on commit 1ddaae6

Please sign in to comment.