Show Menu
Cheatography

Silverstripe 2.4 Cheat Sheet (DRAFT) by

silverstripe cheat sheet

This is a draft cheat sheet. It is a work in progress and is not finished yet.

RETRIEVING DATAOB­JECTS

many at once: DataOb­jec­t::­get­($c­all­erC­lass, $filter , $sort , $join , $limit ,$con­tai­ner­Class );
one: DataOb­jec­t::­get­_on­e($­cal­ler­Class, $filter , $cache = true, $order­by);
one using ID: DataOb­jec­t::­get­_by­_id­($c­all­erC­lass, $id);
children: $this-­>ge­tDe­sce­nda­ntI­DLi­st();

versioned data objects

if(Versioned::current_stage() == "Live") {
$extension = "_Live";
}