/** * Set up template methods to access the transformations generated by 'generate' methods. */ public function defineMethods() { $methodNames = $this->allMethodNames(); foreach ($methodNames as $methodName) { if (substr($methodName, 0, 8) == 'generate') { $this->addWrapperMethod(substr($methodName, 8), 'getFormattedImage'); } } parent::defineMethods(); }