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