public function run() { $faker = Faker::create(); foreach (range(1, 10) as $index) { Leaf::create([]); } }
/** * Initializes the leaf * Passes the Parameters to its child leafs. * * @param int $index Index of this leaf * @param array $parentIndices Array with parent indices * * @return void */ public function init($index, array $parentIndices = array()) { if (!is_numeric($index) || !is_array($parentIndices)) { if (TYPO3_DLOG) { \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('init (CommerceTeam\\Commerce\\Tree\\Leaf\\Slave) gets passed invalid parameters.', COMMERCE_EXTKEY, 3); } return; } // Initialize the \CommerceTeam\Commerce\Tree\Leaf\Data $this->data->init(); $this->data->initRecords($index, $parentIndices, $this->parentLeaf->data); parent::init($index, $parentIndices); }
public function __construct($text, Node $parent = null) { parent::__construct($parent); $this->_text = $text; }