protected function createLayoutBox($type, $identifier, $name, $settings = []) { $layoutBox = new LayoutBox(); $layoutBox->setBoxType($type); $layoutBox->setIdentifier($identifier); $layoutBox->setSettings($settings); $layoutBox->translate('en')->setName($name); $layoutBox->mergeNewTranslations(); $this->manager->persist($layoutBox); }