| @@ 719-731 (lines=13) @@ | ||
| 716 | * |
|
| 717 | * @return int počet načtených položek |
|
| 718 | */ |
|
| 719 | public function loadFromFlexiBee($id = null) |
|
| 720 | { |
|
| 721 | $data = []; |
|
| 722 | if (is_null($id)) { |
|
| 723 | $id = $this->getMyKey(); |
|
| 724 | } |
|
| 725 | ||
| 726 | $flexidata = $this->getFlexiData(null, '/'.$id); |
|
| 727 | if (count($flexidata) == 1) { |
|
| 728 | $data = current($flexidata); |
|
| 729 | } |
|
| 730 | return $this->takeData($data); |
|
| 731 | } |
|
| 732 | ||
| 733 | /** |
|
| 734 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 798-811 (lines=14) @@ | ||
| 795 | * sloupečku |
|
| 796 | * @return array |
|
| 797 | */ |
|
| 798 | public function getAllFromFlexibee($conditions = null, $indexBy = null) |
|
| 799 | { |
|
| 800 | if (is_int($conditions)) { |
|
| 801 | $conditions = [$this->getmyKeyColumn() => $conditions]; |
|
| 802 | } |
|
| 803 | ||
| 804 | $flexiData = $this->getFlexiData('', $conditions); |
|
| 805 | ||
| 806 | if (!is_null($indexBy)) { |
|
| 807 | $flexiData = $this->reindexArrayBy($flexiData); |
|
| 808 | } |
|
| 809 | ||
| 810 | return $flexiData; |
|
| 811 | } |
|
| 812 | ||
| 813 | /** |
|
| 814 | * Vrací z FlexiBee sloupečky podle podmínek. |
|