AgentFactory.php
2 days ago
ApprovedFactory.php
2 days ago
AuthorAvatarFactory.php
2 days ago
AuthorEmailFactory.php
2 days ago
AuthorIpFactory.php
2 days ago
AuthorNameFactory.php
2 days ago
AuthorUrlFactory.php
2 days ago
CommentTypeFactory.php
2 days ago
DateGmtFactory.php
2 days ago
ExcerptFactory.php
2 days ago
IdFactory.php
2 days ago
PostFactory.php
2 days ago
ReplyToFactory.php
2 days ago
StatusFactory.php
2 days ago
UserFactory.php
2 days ago
WordCountFactory.php
2 days ago
AuthorAvatarFactory.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ColumnFactory\Comment; |
| 6 | |
| 7 | use AC; |
| 8 | use AC\Column\BaseColumnFactory; |
| 9 | use AC\FormatterCollection; |
| 10 | use AC\Setting\Config; |
| 11 | |
| 12 | class AuthorAvatarFactory extends BaseColumnFactory |
| 13 | { |
| 14 | public function get_label(): string |
| 15 | { |
| 16 | return __('Avatar', 'codepress-admin-columns'); |
| 17 | } |
| 18 | |
| 19 | public function get_column_type(): string |
| 20 | { |
| 21 | return 'column-author_avatar'; |
| 22 | } |
| 23 | |
| 24 | protected function get_formatters(Config $config): FormatterCollection |
| 25 | { |
| 26 | $formatters = new FormatterCollection([ |
| 27 | new AC\Formatter\Comment\CommentObject(), |
| 28 | new AC\Formatter\Avatar(), |
| 29 | ]); |
| 30 | |
| 31 | return $formatters->merge( |
| 32 | parent::get_formatters($config) |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | } |
| 37 |