PHP code example of magently / module-content-setup
1. Go to this page and download the library: Download magently/module-content-setup library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
magently / module-content-setup example snippets
public function __construct(\Magently\ContentSetup\Model\ContentSetupFactory $contentSetupFactory)
{
$this->contentSetupFactory = $contentSetupFactory;
}
/** @var \Magently\ContentSetup\Model\ContentSetup $setup */
$setup = $this->contentSetupFactory->create(['moduleName' => 'Magently_TestModule']);
// file: app/code/Magently/TestModule/Setup/Content/Block/test_block.php
return [
'title' => 'Magently Test Block',
'identifier' => 'test_block',
'is_active' => 1
];