| @@ 800-812 (lines=13) @@ | ||
| 797 | * | |
| 798 | * @return int počet načtených položek | |
| 799 | */ | |
| 800 | public function loadFromFlexiBee($id = null) | |
| 801 |     { | |
| 802 | $data = []; | |
| 803 |         if (is_null($id)) { | |
| 804 | $id = $this->getMyKey(); | |
| 805 | } | |
| 806 | ||
| 807 | $flexidata = $this->getFlexiData(null, '/'.$id); | |
| 808 |         if (count($flexidata) == 1) { | |
| 809 | $data = current($flexidata); | |
| 810 | } | |
| 811 | return $this->takeData($data); | |
| 812 | } | |
| 813 | ||
| 814 | /** | |
| 815 | * Převede data do Json formátu pro FlexiBee. | |
| @@ 887-900 (lines=14) @@ | ||
| 884 | * sloupečku | |
| 885 | * @return array | |
| 886 | */ | |
| 887 | public function getAllFromFlexibee($conditions = null, $indexBy = null) | |
| 888 |     { | |
| 889 |         if (is_int($conditions)) { | |
| 890 | $conditions = [$this->getmyKeyColumn() => $conditions]; | |
| 891 | } | |
| 892 | ||
| 893 |         $flexiData = $this->getFlexiData('', $conditions); | |
| 894 | ||
| 895 |         if (!is_null($indexBy)) { | |
| 896 | $flexiData = $this->reindexArrayBy($flexiData); | |
| 897 | } | |
| 898 | ||
| 899 | return $flexiData; | |
| 900 | } | |
| 901 | ||
| 902 | /** | |
| 903 | * Vrací z FlexiBee sloupečky podle podmínek. | |