Sections=[]; if(count($options->Rows)>0) { $options->Sections=[]; $options->Sections[]=(new SectionOptionsDTO()); ($options->Sections[0])->LoadDefaultValues(); $options->Sections[0]->Rows=$options->Rows; $options->Rows=[]; } $this->SectionManager=new SectionManager($this); } protected function InternalInitialize() { parent::InternalInitialize(); $this->SectionManager->Initialize(); } public function GetChildren() { return $this->Sections; } protected function GetTemplateName() { return 'TwigManager/Renderers/Blocks/SubsectionBlockRenderer.twig'; } public function GetSectionOptions() { return $this->Options->Sections; } protected function GetFileObjects($validate=true,$basePath='') { $files=[]; foreach($this->Sections as $currentSection) { foreach($currentSection->Rows as $currentRow) { foreach($currentRow->Columns as $currentColumn) { foreach($currentColumn->Blocks as $currentBlock) { $files=array_merge($files,$currentBlock->GetFileToSave($validate,$basePath)); } } } } return $files; } }