/ Gists / Test datových typů, Nette 2.0 AW
On gists

Test datových typů, Nette 2.0 AW

AW

dataTypes.php Raw #

<?php

		/**
		 * TEST DATOVYCH TYPU
		 */

		call_user_func(function() { 

			// krabice
			$krabiceActiveRow = $this->connection->table('eshop_item')->where('id', 1467)->fetch();
			$krabiceDataset = $krabiceActiveRow->getDataset();
			$pv = $krabiceDataset->getPrimaryVariant();
			_bardump($krabiceActiveRow);

		});

		call_user_func(function() { 

			// varianta
			$varianta = $this->connection->table('eshop_item_variant')->where('id', 5411)->fetch();
			$krabiceActiveRow = $varianta->eshop_item;
			$krabiceDataset = $krabiceActiveRow->getDataset();
			$pv = $krabiceDataset->getPrimaryVariant(); // nerfunkcni viz http://bit.ly/2zzn4NI

			_bardump($krabiceActiveRow);

		});