@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * |
| 169 | 169 | * @param integer $width The width to size to |
| 170 | 170 | * @param integer $height The height to size to |
| 171 | - * @return AssetContainer |
|
| 171 | + * @return ImageManipulation |
|
| 172 | 172 | */ |
| 173 | 173 | public function Pad($width, $height, $backgroundColor = 'FFFFFF') { |
| 174 | 174 | if($this->isSize($width, $height)) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | /** |
| 188 | 188 | * Forces the image to be resampled, if possible |
| 189 | 189 | * |
| 190 | - * @return AssetContainer |
|
| 190 | + * @return ImageManipulation |
|
| 191 | 191 | */ |
| 192 | 192 | public function Resampled() { |
| 193 | 193 | // If image is already resampled, return self reference |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * |
| 238 | 238 | * @param integer $width Width to resize to |
| 239 | 239 | * @param integer $height Height to resize to |
| 240 | - * @return AssetContainer |
|
| 240 | + * @return ImageManipulation |
|
| 241 | 241 | */ |
| 242 | 242 | public function ResizedImage($width, $height) { |
| 243 | 243 | if($this->isSize($width, $height)) { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * |
| 256 | 256 | * @param integer $width The width to size within |
| 257 | 257 | * @param integer $height The height to size within |
| 258 | - * @return AssetContainer |
|
| 258 | + * @return null|ImageManipulation |
|
| 259 | 259 | */ |
| 260 | 260 | public function Fit($width, $height) { |
| 261 | 261 | // Prevent divide by zero on missing/blank file |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | * @uses ScalingManipulation::Fit() |
| 294 | 294 | * @param integer $width The maximum width of the output image |
| 295 | 295 | * @param integer $height The maximum height of the output image |
| 296 | - * @return AssetContainer |
|
| 296 | + * @return ImageManipulation |
|
| 297 | 297 | */ |
| 298 | 298 | public function FitMax($width, $height) { |
| 299 | 299 | return $this->getWidth() > $width || $this->getHeight() > $height |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * Scale image proportionally by width. Use in templates with $ScaleWidth. |
| 307 | 307 | * |
| 308 | 308 | * @param integer $width The width to set |
| 309 | - * @return AssetContainer |
|
| 309 | + * @return ImageManipulation |
|
| 310 | 310 | */ |
| 311 | 311 | public function ScaleWidth($width) { |
| 312 | 312 | if($this->isWidth($width)) { |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * |
| 326 | 326 | * @uses ScalingManipulation::ScaleWidth() |
| 327 | 327 | * @param integer $width The maximum width of the output image |
| 328 | - * @return AssetContainer |
|
| 328 | + * @return ImageManipulation |
|
| 329 | 329 | */ |
| 330 | 330 | public function ScaleMaxWidth($width) { |
| 331 | 331 | return $this->getWidth() > $width |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | * Scale image proportionally by height. Use in templates with $ScaleHeight. |
| 338 | 338 | * |
| 339 | 339 | * @param int $height The height to set |
| 340 | - * @return AssetContainer |
|
| 340 | + * @return ImageManipulation |
|
| 341 | 341 | */ |
| 342 | 342 | public function ScaleHeight($height) { |
| 343 | 343 | if($this->isHeight($height)) { |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | * |
| 357 | 357 | * @uses ScalingManipulation::ScaleHeight() |
| 358 | 358 | * @param integer $height The maximum height of the output image |
| 359 | - * @return AssetContainer |
|
| 359 | + * @return ImageManipulation |
|
| 360 | 360 | */ |
| 361 | 361 | public function ScaleMaxHeight($height) { |
| 362 | 362 | return $this->getHeight() > $height |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | * |
| 372 | 372 | * @uses CropManipulation::Fill() |
| 373 | 373 | * @param integer $width The maximum width of the output image |
| 374 | - * @return AssetContainer |
|
| 374 | + * @return ImageManipulation |
|
| 375 | 375 | */ |
| 376 | 376 | public function CropWidth($width) { |
| 377 | 377 | return $this->getWidth() > $width |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * |
| 386 | 386 | * @uses CropManipulation::Fill() |
| 387 | 387 | * @param integer $height The maximum height of the output image |
| 388 | - * @return AssetContainer |
|
| 388 | + * @return ImageManipulation |
|
| 389 | 389 | */ |
| 390 | 390 | public function CropHeight($height) { |
| 391 | 391 | return $this->getHeight() > $height |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * @uses ImageManipulation::Fill() |
| 402 | 402 | * @param integer $width The relative (used to determine aspect ratio) and maximum width of the output image |
| 403 | 403 | * @param integer $height The relative (used to determine aspect ratio) and maximum height of the output image |
| 404 | - * @return AssetContainer |
|
| 404 | + * @return null|ImageManipulation |
|
| 405 | 405 | */ |
| 406 | 406 | public function FillMax($width, $height) { |
| 407 | 407 | // Prevent divide by zero on missing/blank file |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | * |
| 437 | 437 | * @param integer $width Width to crop to |
| 438 | 438 | * @param integer $height Height to crop to |
| 439 | - * @return AssetContainer |
|
| 439 | + * @return ImageManipulation |
|
| 440 | 440 | */ |
| 441 | 441 | public function Fill($width, $height) { |
| 442 | 442 | if($this->isSize($width, $height)) { |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | * |
| 488 | 488 | * @param int $width |
| 489 | 489 | * @param int $height |
| 490 | - * @return AssetContainer |
|
| 490 | + * @return ImageManipulation |
|
| 491 | 491 | */ |
| 492 | 492 | public function Thumbnail($width, $height) { |
| 493 | 493 | return $this->Pad($height, $height); |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | /** |
| 510 | 510 | * Get HTML for img containing the icon for this file |
| 511 | 511 | * |
| 512 | - * @return type |
|
| 512 | + * @return DBField |
|
| 513 | 513 | */ |
| 514 | 514 | public function IconTag() { |
| 515 | 515 | return DBField::create_field( |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
| 6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
| 7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
| 8 | - |
|
| 9 | 8 | use Injector; |
| 10 | 9 | use AssetField; |
| 11 | 10 | use File; |
@@ -186,6 +186,9 @@ |
||
| 186 | 186 | return $classNames; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | + /** |
|
| 190 | + * @param \DBClassNameTest_ObjectSubClass $record |
|
| 191 | + */ |
|
| 189 | 192 | public function setValue($value, $record = null, $markChanged = true) { |
| 190 | 193 | parent::setValue($value, $record, $markChanged); |
| 191 | 194 | |
@@ -2,9 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Model\FieldType; |
| 4 | 4 | |
| 5 | -use DB; |
|
| 6 | 5 | use DataObject; |
| 7 | -use ClassInfo; |
|
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * A special ForeignKey class that handles relations with arbitrary class types |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Model\FieldType; |
| 4 | 4 | |
| 5 | -use DataList; |
|
| 6 | -use DropdownField; |
|
| 7 | 5 | use DB; |
| 8 | 6 | use DataObject; |
| 9 | 7 | |