Werner Krauss

Freelancer. Does PHP since 1998 and uses Silverstripe since 2009. Runs different customer websites and his main project, www.hallstatt.net with it.

When he's not in front of his laptop he enjoys family and playing his guitar.

Posts by Werner Krauss for Blog:

How to speed up unit tests using sqlite

Running unit tests might be dead slow if you're using mysql for it, cause for every test a new DB is set up and destroyed afterwards.
Read more about 'How to speed up unit tests using sqlite'...

Save $many_many_extraFields when adding a DataObject to a list

Assuming you have a $many_many relation and SortOrder defined as $many_many_extraFields you can add an item to this ManyManyList and pass the extraFields as an array:
Read more about 'Save $many_many_extraFields when adding a DataObject to a list'...

How to tell, if a DataObject is already written to DB

Sometimes you want to check, if you're DataObject is still a new object or already written to DB, e..g in your onBeforeWrite() method. You can either check
Read more about 'How to tell, if a DataObject is already written to DB'...

Howto send emails to more recipients

Silverstripe's Email class uses the standard php mail() function for sending emails. Sending an email to one recipient is clear, put the mail adress in the "to" parameter.
Read more about 'Howto send emails to more recipients'...

1 2 3 4 5 6