I am trying to create an install script to overwrite some bluefoot configurations. I am trying to figure out what is in the $buttonItemBlock
variable so that I can pass that to another class. However I can not get anything to print during upgrade in the console.
<?php
namespace vender\module\Setup;
use Gene\BlueFoot\Model\Installer\File as InstallerFile;
use Magento\Framework\Filesystem\Io\File as IoFile;
use Magento\Framework\Module\Dir\Reader;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Gene\BlueFoot\Model\Attribute\ContentBlockRepository;
/**
* Class to install data for list builder BlueFoot block
*/
class InstallData implements InstallDataInterface
{
/**
* @var Reader
*/
protected $moduleReader;
/**
* @var IoFile
*/
protected $ioFile;
/**
* @var InstallerFile
*/
protected $fileInstaller;
/**
* @var Bluefoot content block repository manager
*/
protected $contentBlockRepository;
/**
* InstallData constructor.
*
* @param Reader $moduleReader
* @param IoFile $ioFile
* @param InstallerFile $fileInstaller
*/
public function __construct(
Reader $moduleReader,
IoFile $ioFile,
InstallerFile $fileInstaller,
ContentBlockRepository $contentBlockRepository
) {
$this->moduleReader = $moduleReader;
$this->ioFile = $ioFile;
$this->fileInstaller = $fileInstaller;
$this->contentBlockRepository = $contentBlockRepository;
}
/**
* Installs data for a module
*
* @param ModuleDataSetupInterface $setup
* @param ModuleContextInterface $context
*/
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
$buttonItemBlock = $this->contentBlockRepository->getByIdentifier('button_item');
var_dump($buttonItemBlock);exit;
//Install the blocks and attributes
//$this->installData($setup);
$setup->endSetup();
}
}