Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
extending ElggObject - instanceof issue
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Krishna Shetty  
View profile  
 More options Sep 7 2012, 10:53 am
From: Krishna Shetty <krishna.shett...@gmail.com>
Date: Fri, 7 Sep 2012 07:53:46 -0700 (PDT)
Local: Fri, Sep 7 2012 10:53 am
Subject: extending ElggObject - instanceof issue

I have created a class which extends ElggObject. I have put this in  
'classes' folder of my plugin.
I can instantiate( new MyClass() ) this class like this works fine  .And I
can save the details in to my class instance, works fine.

I can retrieve all my class objects using elgg_get_entities() with type as
'object' and subtype as sub type defined in my class.
Issue is, objects returned by elgg_get_entities() are not an 'instanceof'
of my class but instance of ElggObject.

Please tell me if I need to take care any thing for this to work

Thanks,Krishna


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Clay  
View profile  
 More options Sep 7 2012, 11:19 am
From: Steve Clay <st...@elgg.org>
Date: Fri, 7 Sep 2012 11:19:01 -0400
Local: Fri, Sep 7 2012 11:19 am
Subject: Re: [Elgg development] extending ElggObject - instanceof issue

You're very close! Look at add_subtype() and see how other plugins use it.

Steve
--
http://www.mrclay.org/

On Sep 7, 2012, at 10:53 AM, Krishna Shetty <krishna.shett...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krishna Shetty  
View profile  
 More options Sep 7 2012, 11:37 am
From: Krishna Shetty <krishna.shett...@gmail.com>
Date: Fri, 7 Sep 2012 08:37:56 -0700 (PDT)
Local: Fri, Sep 7 2012 11:37 am
Subject: Re: [Elgg development] extending ElggObject - instanceof issue

Thank you. With this, it works fine now.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »