CWP\CWP\Tasks\PopulateThemeSampleDataTask
Used to populate sample data when installing the starter or Wātea theme
Synopsis
class PopulateThemeSampleDataTask
extends BuildTask
{
- // members
- protected string $title = 'Populate sample data for theme demo';
- protected object $description = 'Populates some sample data for showcasing the functionality of the ' . 'starter and Wātea themes;
- // methods
- public void run()
- protected $this handleContactForm()
- protected bool getContactFormExists()
- protected $this createContactForm()
- protected $this output()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Members
protected
- $description
- $title
Methods
protected
- createContactForm() — Create a "contact us" userform. Please note that this form does not have any recipients by default, so no emails will be sent. To add recipients - edit the page in the CMS and add a recipient via the "Recipients" tab.
- getContactFormExists() — Determine whether a "contact us" userform exists yet
- handleContactForm() — Decide whether to create a contact user defined form, and call it to be be created if so
- output() — Output a message either to the console or browser
public
- run() — A series of method calls to create sample data