1 | <?php |
||
12 | class ConversionCollection extends Collection |
||
13 | { |
||
14 | /** |
||
15 | * @param \Spatie\MediaLibrary\Media $media |
||
16 | * |
||
17 | * @return static |
||
18 | */ |
||
19 | public static function createForMedia(Media $media) |
||
23 | |||
24 | /** |
||
25 | * @param \Spatie\MediaLibrary\Media $media |
||
26 | * |
||
27 | * @return $this |
||
28 | */ |
||
29 | public function setMedia(Media $media) |
||
39 | |||
40 | /** |
||
41 | * Get a conversion by it's name. |
||
42 | * |
||
43 | * @param string $name |
||
44 | * |
||
45 | * @return mixed |
||
46 | * |
||
47 | * @throws \Spatie\MediaLibrary\Exceptions\InvalidConversion |
||
48 | */ |
||
49 | public function getByName(string $name) |
||
61 | |||
62 | /** |
||
63 | * Add the conversion that are defined on the related model of |
||
64 | * the given media. |
||
65 | * |
||
66 | * @param \Spatie\MediaLibrary\Media $media |
||
67 | */ |
||
68 | protected function addConversionsFromRelatedModel(Media $media) |
||
84 | |||
85 | /** |
||
86 | * Add the extra manipulations that are defined on the given media. |
||
87 | * |
||
88 | * @param \Spatie\MediaLibrary\Media $media |
||
89 | */ |
||
90 | protected function addManipulationsFromDb(Media $media) |
||
96 | |||
97 | /** |
||
98 | * Get all the conversions in the collection. |
||
99 | * |
||
100 | * @param string $collectionName |
||
101 | * |
||
102 | * @return $this |
||
103 | */ |
||
104 | public function getConversions(string $collectionName = '') |
||
114 | |||
115 | /* |
||
116 | * Get all the conversions in the collection that should be queued. |
||
117 | */ |
||
118 | public function getQueuedConversions(string $collectionName = '') : ConversionCollection |
||
124 | |||
125 | /* |
||
126 | * Add the given manipulation to the conversion with the given name. |
||
127 | */ |
||
128 | protected function addManipulationToConversion(array $manipulation, string $conversionName) |
||
138 | |||
139 | /* |
||
140 | * Get all the conversions in the collection that should not be queued. |
||
141 | */ |
||
142 | public function getNonQueuedConversions(string $collectionName = '') : ConversionCollection |
||
148 | |||
149 | /** |
||
150 | * Return the list of conversion files. |
||
151 | */ |
||
152 | public function getConversionsFiles(string $collectionName = '') : ConversionCollection |
||
158 | } |
||
159 |