1 | <?php |
||
13 | class ConversionCollection extends Collection |
||
14 | { |
||
15 | /** |
||
16 | * @param \Spatie\MediaLibrary\Media $media |
||
17 | * |
||
18 | * @return static |
||
19 | */ |
||
20 | public static function createForMedia(Media $media) |
||
24 | |||
25 | /** |
||
26 | * @param \Spatie\MediaLibrary\Media $media |
||
27 | * |
||
28 | * @return $this |
||
29 | */ |
||
30 | public function setMedia(Media $media) |
||
40 | |||
41 | /** |
||
42 | * Get a conversion by it's name. |
||
43 | * |
||
44 | * @param string $name |
||
45 | * |
||
46 | * @return mixed |
||
47 | * |
||
48 | * @throws \Spatie\MediaLibrary\Exceptions\InvalidConversion |
||
49 | */ |
||
50 | public function getByName(string $name) |
||
62 | |||
63 | /** |
||
64 | * Add the conversion that are defined on the related model of |
||
65 | * the given media. |
||
66 | * |
||
67 | * @param \Spatie\MediaLibrary\Media $media |
||
68 | */ |
||
69 | protected function addConversionsFromRelatedModel(Media $media) |
||
96 | |||
97 | /** |
||
98 | * Add the extra manipulations that are defined on the given media. |
||
99 | * |
||
100 | * @param \Spatie\MediaLibrary\Media $media |
||
101 | */ |
||
102 | protected function addManipulationsFromDb(Media $media) |
||
108 | |||
109 | /** |
||
110 | * Get all the conversions in the collection. |
||
111 | * |
||
112 | * @param string $collectionName |
||
113 | * |
||
114 | * @return $this |
||
115 | */ |
||
116 | public function getConversions(string $collectionName = '') |
||
124 | |||
125 | /* |
||
126 | * Get all the conversions in the collection that should be queued. |
||
127 | */ |
||
128 | public function getQueuedConversions(string $collectionName = ''): ConversionCollection |
||
132 | |||
133 | /* |
||
134 | * Add the given manipulation to the conversion with the given name. |
||
135 | */ |
||
136 | protected function addManipulationToConversion(Manipulations $manipulations, string $conversionName) |
||
142 | |||
143 | /* |
||
144 | * Get all the conversions in the collection that should not be queued. |
||
145 | */ |
||
146 | public function getNonQueuedConversions(string $collectionName = ''): ConversionCollection |
||
150 | |||
151 | /** |
||
152 | * Return the list of conversion files. |
||
153 | */ |
||
154 | public function getConversionsFiles(string $collectionName = ''): ConversionCollection |
||
160 | } |
||
161 |