Skip to content

Commit

Permalink
DOCS fix namespace for Wrapper class
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherdarling authored Jul 20, 2022
1 parent c5566d7 commit b5a509d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ $shipping->displayIf("ProductType")->isEqualTo("furniture")
```php
<?php

use UncleCheese\DisplayLogic\Wrapper;
use UncleCheese\DisplayLogic\Forms\Wrapper;
//...
public function getCMSFields() {
$f = parent::getCMSFields();
Expand Down Expand Up @@ -141,7 +141,7 @@ use UncleCheese\DisplayLogic\Wrapper;
```

## Dealing with non-standard form fields
Sometimes you will want to wrap display logic around a form field that does not use the standard FormField template, such as GridField or LiteralField. For these cases, you can wrap the form field in UncleCheese\DisplayLogic\Wrapper.
Sometimes you will want to wrap display logic around a form field that does not use the standard FormField template, such as GridField or LiteralField. For these cases, you can wrap the form field in UncleCheese\DisplayLogic\Forms\Wrapper.
```php
$fields->addFieldToTab("Root.Main", Wrapper::create(
LiteralField::create("foo","<h2>Hello</h2>")
Expand Down

0 comments on commit b5a509d

Please sign in to comment.