Insert a site into the database.

Some of the $sitedata array fields have filters associated with the values. Exceptions are 'site_owner', 'site_registered' and 'site_modified' The filters have the prefix 'pre.' followed by the field name. An example using 'site_name' would have the filter called, 'pre.site.name' that can be hooked into.


  • Full name: cms_insert_site
  • Defined in: cms/core/Shared/Helpers/site.php

Parameters

Parameter Type Description
$sitedata array|\App\Domain\Site\Model\Site|\Psr\Http\Message\ServerRequestInterface {
An array or Site array of user data arguments.

Return Value

string|\Qubus\Error\Error

The newly created site's id or Error if the site could not be created.