protected function MinisiteItem::createMinisite in Mini site 8
Create Minisite instance from field values and save it.
Parameters
\Drupal\Core\Field\FieldItemList $item_list: The item list.
1 call to MinisiteItem::createMinisite()
- MinisiteItem::postSave in src/
Plugin/ Field/ FieldType/ MinisiteItem.php - Defines custom post-save behavior for field values.
File
- src/
Plugin/ Field/ FieldType/ MinisiteItem.php, line 232
Class
- MinisiteItem
- Plugin implementation of the Minisite field type.
Namespace
Drupal\minisite\Plugin\Field\FieldTypeCode
protected function createMinisite(FieldItemList $item_list) {
$minisite = Minisite::createInstance($item_list);
if ($minisite) {
$minisite
->save();
// Set asset path from uploaded archive.
$this->asset_path = $minisite
->getIndexAssetUri();
}
}