saveBlock( 'lts-footer-link-columns', 'LTS Footer - Link Columns', $this->getLinkColumnsContent() ); $this->saveBlock( 'lts-footer-social-app', 'LTS Footer - Social And Mobile App', $this->getSocialAppContent() ); return $this; } private function saveBlock(string $identifier, string $title, string $content): void { $block = $this->blockFactory->create()->getCollection() ->addFieldToFilter('identifier', $identifier) ->setPageSize(1) ->getFirstItem(); if (!$block->getId()) { $block = $this->blockFactory->create(); } $block->setTitle($title) ->setIdentifier($identifier) ->setContent($content) ->setIsActive(true) ->setStores([0]) ->save(); } private function getLinkColumnsContent(): string { return <<<'HTML' HTML; } private function getSocialAppContent(): string { return <<<'HTML'
HTML; } public static function getDependencies(): array { return [CreateShopByCategoryBlock::class]; } public function getAliases(): array { return []; } }