Пример #1
0
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Leaf::create([]);
     }
 }
Пример #2
0
 /**
  * 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);
 }
Пример #3
0
 public function __construct($text, Node $parent = null)
 {
     parent::__construct($parent);
     $this->_text = $text;
 }