| @@ 791-803 (lines=13) @@ | ||
| 788 | * |
|
| 789 | * @return int počet načtených položek |
|
| 790 | */ |
|
| 791 | public function loadFromFlexiBee($id = null) |
|
| 792 | { |
|
| 793 | $data = []; |
|
| 794 | if (is_null($id)) { |
|
| 795 | $id = $this->getMyKey(); |
|
| 796 | } |
|
| 797 | ||
| 798 | $flexidata = $this->getFlexiData(null, '/'.$id); |
|
| 799 | if (count($flexidata) == 1) { |
|
| 800 | $data = current($flexidata); |
|
| 801 | } |
|
| 802 | return $this->takeData($data); |
|
| 803 | } |
|
| 804 | ||
| 805 | /** |
|
| 806 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 878-891 (lines=14) @@ | ||
| 875 | * sloupečku |
|
| 876 | * @return array |
|
| 877 | */ |
|
| 878 | public function getAllFromFlexibee($conditions = null, $indexBy = null) |
|
| 879 | { |
|
| 880 | if (is_int($conditions)) { |
|
| 881 | $conditions = [$this->getmyKeyColumn() => $conditions]; |
|
| 882 | } |
|
| 883 | ||
| 884 | $flexiData = $this->getFlexiData('', $conditions); |
|
| 885 | ||
| 886 | if (!is_null($indexBy)) { |
|
| 887 | $flexiData = $this->reindexArrayBy($flexiData); |
|
| 888 | } |
|
| 889 | ||
| 890 | return $flexiData; |
|
| 891 | } |
|
| 892 | ||
| 893 | /** |
|
| 894 | * Vrací z FlexiBee sloupečky podle podmínek. |
|