Skip to content

Commit

Permalink
Rename tableAttributeHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvantuycom authored Jul 18, 2024
1 parent 6cc145b commit 51172d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/5.x/extend/element-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ If a user has customized a source, the default attributes will no longer apply t
Table attribute values default to the corresponding element attribute, cast as a string. Add a protected `tableAttributeHtml()` method on your element class to override the returned HTML:

```php
protected function tableAttributeHtml(string $attribute): string
protected function attributeHtml(string $attribute): string
{
switch ($attribute) {
case 'price':
Expand All @@ -714,7 +714,7 @@ protected function tableAttributeHtml(string $attribute): string
return strtoupper($this->currency);
}

return parent::tableAttributeHtml($attribute);
return parent::attributeHtml($attribute);
}
```

Expand Down

0 comments on commit 51172d7

Please sign in to comment.