Skip to content

Commit

Permalink
Merge pull request #633 from thomasvantuycom/patch/attributeHtml
Browse files Browse the repository at this point in the history
Rename tableAttributeHtml
  • Loading branch information
AugustMiller authored Feb 7, 2025
2 parents 6d7cc0a + 51172d7 commit 9b54288
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 @@ -712,7 +712,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 @@ -722,7 +722,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 9b54288

Please sign in to comment.