Message of the day:
SS 4.4.2 is out. Changelog: https://github.com/silverstripe/silverstripe-framework/blob/4/docs/en/04_Changelogs/4.4.2.md
SilverStripe 4 related information and questions.
probably more efficient
Just as many lines of code I guess, but means it should all be covered in SQL and probably with a
"Created" BETWEEN 'X AND 'Y'
or just some<=
obviously Created has a time so I am trying to format the time out of it
I am trying to get groups that were created today
Morning, has anyone got a better way / workable way of me achieving the following?
- $Date = $Date->format('Y-m-d');
- $Group = GazingaGroup::get()->filter(array("Created.Format('Y-m-d')" => $Date));
Answered my own question, wrap the SVG in
DBHTMLText before pushing in to the
- $html = DBHTMLText::create()->setValue($svg);
- 'Chart' => $html,
- 'Label' => $label,
- 'Value' => $data['PercentageIncluded']
I think this would work if my method had the SVG as it's sole return value:
- private static $casting = [
- 'MyCustomMethod' => 'HTMLText'
but it returns an
- return ArrayList::create([
- ArrayData::create(['Chart' => [SVG], 'Label' => 'Some String']),
- ArrayData::create(['Chart' => [SVG], 'Label' => 'Some String'])