Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
matfish3 committed Aug 31, 2022
1 parent e0a887a commit 3a40c74
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,35 @@ Note that the element must be already saved in order to use metadata methods.
Set metadata (will replace existing metadata):

```php
$entry->setEntryMetadata([
$entry->setElementMetadata([
'foo'=>'bar'
]);
```

Add to existing metadata, or replace an existing value:

```php
$entry->addEntryMetadata([
$entry->addElementMetadata([
'a'=>1
]);
```

Get all metadata of an entry:

```php
$entry->getEntryMetadata();
$entry->getElementMetadata();
```

Get a specific key value:

```php
$entry->getEntryMetadata('foo');
$entry->getElementMetadata('foo');
```

Or using Twig:

```twig
{{entry.getEntryMetadata('foo')}}
{{entry.getElementMetadata('foo')}}
```

### Query by metadata
Expand Down

0 comments on commit 3a40c74

Please sign in to comment.