Last active
September 15, 2015 15:21
-
-
Save muskie9/9ad52db37832bdc8db11 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyObject extends DataObject{ | |
private static $has_one = array( | |
'Image' => 'Image' | |
); | |
public function getOriginalImage(){ | |
return $this->Image(); | |
} | |
public function getMyCroppedVersion(){ | |
return $this->Image()->croppedImage(50,50); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment