AlbumFactory.php
2 days ago
AlternateTextFactory.php
2 days ago
ArtistFactory.php
2 days ago
AudioPlayerFactory.php
2 days ago
AvailableSizesFactory.php
2 days ago
CaptionFactory.php
2 days ago
DimensionsFactory.php
2 days ago
DownloadFactory.php
2 days ago
ExifDataFactory.php
2 days ago
FileMetaAudioFactory.php
2 days ago
FileMetaVideoFactory.php
2 days ago
FileNameFactory.php
2 days ago
FileSizeFactory.php
2 days ago
FullPathFactory.php
2 days ago
HeightFactory.php
2 days ago
ImageFactory.php
2 days ago
MimeTypeFactory.php
2 days ago
PreviewFactory.php
2 days ago
VideoPlayerFactory.php
2 days ago
WidthFactory.php
2 days ago
AlbumFactory.php
39 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ColumnFactory\Media; |
| 6 | |
| 7 | use AC\Column\BaseColumnFactory; |
| 8 | use AC\Formatter\Media\AttachmentMetaData; |
| 9 | use AC\FormatterCollection; |
| 10 | use AC\Setting\Config; |
| 11 | |
| 12 | class AlbumFactory extends BaseColumnFactory |
| 13 | { |
| 14 | public function get_column_type(): string |
| 15 | { |
| 16 | return 'column-meta_album'; |
| 17 | } |
| 18 | |
| 19 | public function get_label(): string |
| 20 | { |
| 21 | return __('Album', 'codepress-admin-columns'); |
| 22 | } |
| 23 | |
| 24 | protected function get_group(): ?string |
| 25 | { |
| 26 | return 'media-audio'; |
| 27 | } |
| 28 | |
| 29 | protected function get_formatters(Config $config): FormatterCollection |
| 30 | { |
| 31 | $formatters = parent::get_formatters($config); |
| 32 | |
| 33 | $formatters->add(new AttachmentMetaData('album')); |
| 34 | |
| 35 | return $formatters; |
| 36 | } |
| 37 | |
| 38 | } |
| 39 |