So I am working with plugins alot lately and have a few questions.
Plugins, to me are snippets that are available across projects. If
this is the case, sometimes I will want to use a model that is inside
the project I am working on it. Example: I am working on a clipboard
plugin that I want to use across projects. The problem I am running
into is that sometimes there will be a "User" model and others not. Is
there way to check if a model exists and also if a property exists on
that model. Example, I am trying to do the following and don't know
how:
This is peusdo code...
<cfif $.model.exists("User")>
<cfset var user = $.model.get("User")/>
<cfset user = user.get($.
user.id())/>
<cfif $.property.exists(user,"clipboard")>
<!--- some code --->
</cfif>
</cfif>
I am using the $ because I feel like these should exists in the
helpers. I think the model helper functions that I am showing above do
exist, but I don't think the property ones do. Any ideas on how I can
do something similar to do this?