Jump to:

23023 Posts in 11882 Topics by 2830 members

General Questions

SilverStripe Forums » General Questions » Admin Console issue

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: 271 Views
  • K_T
    Avatar
    Community Member
    8 Posts

    Admin Console issue Link to this post

    Hi All,

    I have created a Simple tab in SS Admin below is the code

    Days.php
    <?php
    class AddDays extends DataObject {

    static $db = array(
    'day_title' => 'Varchar(100)',
    'day_date' => 'Date'
    );

    static $searchable_fields = array(
    'day_title'
    );

    static $summary_fields = array(
    'day_title',
    'day_date',

    );

    }
    ?>

    and for Admin

    <?php
    class DayAdmin extends ModelAdmin {

    public static $managed_models = array(
    'AddDays '
    );

    static $url_segment = 'daylocator';
    static $menu_title = 'Add Days';

    }
    ?>

    fine upto this point I can add the Days from Admin as well but when i try to delete the data I got this warning message

    Deprecated: Function ereg_replace() is deprecated in /sapphire/core/control/Director.php on line 494
    Number of elements must be positive ......
    EDIT:Forgot to mention I am a PHP beginner

    Any Hints why is it behaving so

    Thanks in Advance
    K_T

  • K_T
    Avatar
    Community Member
    8 Posts
    271 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.