Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How to use DataObject Get command

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2568 Views
  • PeeJay
    Avatar
    Community Member
    8 Posts

    How to use DataObject Get command Link to this post

    Hi,

    I am looking for some samples on the use of the following DataObject::Get command to query the data from database:

    $records = DataObject::get($obj, $filter, $sort, $join, $limit);

    I need to use this command to code a couple of controller objects but I can't find the details of $obj, $filter etc. A couple of sample codes will help me to use it.

    Is there any documentation that I can look into?

    Thanks
    Pawan

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: How to use DataObject Get command Link to this post

    If you are looking for API level docs on it you can find it http://api.silverstripe.com/sapphire/model/DataObject.html#get You cannot get controller object - its designed for classes which extend dataobject.

    For examples of dataobject get just look through the tutorials / existing code.

    2568 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.