Created
September 2, 2014 16:55
-
-
Save fadonascimento/d85b11af71f0d47c1194 to your computer and use it in GitHub Desktop.
HtmlHelper::image
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
public function getUrl($image,$options){ | |
$url = Configure::read('webroot_url').'/img/myimg/empty.jpg'; | |
if($this->validate($image,$options)){ | |
/*configurar uma variavel global para pegar url padrão do site neste arquivo*/ | |
$url = 'http://'.$this->s3defaults['cloud_front'].$image['alias'].'/'.$image[$image['alias'].'_id'].'/'.(isset($options['rel'])?$options['rel'].'-':'').$image['name']; | |
} | |
return $url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment