--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at https://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.
You think of some generic frontend CRUD? +1 from me.
+1 Tony ... great idea.
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at https://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.
class ProfileListings
extends ProfileCRUD
implements PermissionProvider
{
private static $menu_icon = '<i class="fa fa-pencil-square-o"></i>';
private static $menu_title = 'Your Listings';
private static $managed_models = [
'ListingItem'
];
public function providePermissions(){
return [
'VIEW_ListingItem' => 'View Listings',
'CREATE_ListingItem' => 'Create Listings',
];
}public static function canView()
{
return Permission::check('CREATE_ListingItem');
}
public static function canCreate()
{
return Permission::check('CREATE_ListingItem');
}
}
class ProfileAnalytic extends ProfileController
{
private static $menu_icon = '<i class="fa fa-pencil-square-o"></i>';
private static $menu_title = 'Analytics';
public static function canView()
{
return Permission::check('VIEW_ANALYTICS');
}
}