1. Go to this page and download the library: Download ttree/jobbutler 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/ */
ttree / jobbutler example snippets
namespace Your\Package\JobConfiguration;
use \Ttree\JobButler\Domain\Model\AbstractJobConfiguration;
use \Ttree\JobButler\Domain\Model\DocumentJobTrait;
use \Ttree\JobButler\Domain\Model\JobConfigurationOptions;
/**
* Export Document Job
*/
class ExportDocumentJob extends AbstractJobConfiguration
{
use DocumentJobTrait;
public function getIcon()
{
return 'print';
}
public function execute(JobConfigurationOptions $options = null)
{
$context = $this->createContext('live');
$sideNode = $context->getNode('/sites/yoursite');
$flowQuery = new FlowQuery(array($sideNode));
$flowQuery = $flowQuery->find('[instanceof TYPO3.Neos.NodeTypes:Page]');
$writer = Writer::createFromFileObject(new \SplTempFileObject());
$writer->insertOne([
'identifier' => 'Identifier',
'title' => 'Page Title'
]);
foreach ($flowQuery as $node) {
/** @var NodeInterface $node */
$writer->insertOne([
'identifier' => $node->getIdentifier(),
'title' => $node->getProperty('title')
]);
}
$this->writeDocument($this->getOption('document', 'export.csv'), $writer);
return true;
}
public function getPackageKey()
{
return "Vendor.PackageKey";
}
}