property name="s3_domain" inject="coldbox:setting:profile_photo_url" persistent="false" getter="true" setter="false";
property name="s3_user_storage" inject="coldbox:setting:s3_user_storage" persistent="false" getter="true" setter="false";
and when I call the below function the values for s3_user_storage and s3_domain are blank. I have verified that I have these settings in my config. Am I missing something??
public string function getDisplayPhoto(){
if(len(trim(this.getPhoto_URL()))){
return "http://#this.gets3_user_storage()#.#this.gets3_domain()#/#this.getPhoto_URL()#";
}else{
return "";
}
}
Thanks.
Nolan
Try accessing the variable directly using "variables.{property_name}" without using the THIS scope or using the implicit getter.
public string function getDisplayPhoto(){
if(len(trim(this.getPhoto_URL()))){
return "http://#variables.gets3_user_storage#.#variables.gets3_domain#/#this.getPhoto_URL()#";
}else{
return "";
}
}
component persistent=true table="User" extends="platform.common.model.BasePersistentObject" cachename="MyCache" cacheuse="transactional" inject{
property name="userid" fieldtype="id" type="numeric" generator="native";
property name="hash" type="string";
property name="firstname" type="string";
property name="lastname" type="string";
property name="email" type="string";
property name="photo_url" type="string";
/** Inject the path for user profile photo storage */
property name="s3" inject="coldbox:myplugin:AmazonS3" persistent="false";
property name="s3_profile_photo_url" inject="coldbox:setting:profile_photo_url" persistent="false" default="";
property name="s3_user_storage" inject="coldbox:setting:s3_user_storage" persistent="false" default="";
public any function getDisplayPhoto(){
if(len(trim(this.getPhoto_URL()))){
return "http://#variables.s3_user_storage#.#variables.s3_profile_photo_url#/#this.getPhoto_URL()#";
}else{
return "";
}
}
}
> --
> You received this message because you are subscribed to the Google Groups
> "ColdBox Platform" group.
> To post to this group, send email to col...@googlegroups.com
> To unsubscribe from this group, send email to
> coldbox-u...@googlegroups.com
> For more options, visit this group at
> http://groups-beta.google.com/group/coldbox
> For News, visit http://blog.coldbox.org
> For Documentation, visit http://wiki.coldbox.org