| @@ 764-776 (lines=13) @@ | ||
| 761 | *  | 
                                |
| 762 | * @return int počet načtených položek  | 
                                |
| 763 | */  | 
                                |
| 764 | public function loadFromFlexiBee($id = null)  | 
                                |
| 765 |     { | 
                                |
| 766 | $data = [];  | 
                                |
| 767 |         if (is_null($id)) { | 
                                |
| 768 | $id = $this->getMyKey();  | 
                                |
| 769 | }  | 
                                |
| 770 | ||
| 771 | $flexidata = $this->getFlexiData(null, '/'.$id);  | 
                                |
| 772 |         if (count($flexidata) == 1) { | 
                                |
| 773 | $data = current($flexidata);  | 
                                |
| 774 | }  | 
                                |
| 775 | return $this->takeData($data);  | 
                                |
| 776 | }  | 
                                |
| 777 | ||
| 778 | /**  | 
                                |
| 779 | * Převede data do Json formátu pro FlexiBee.  | 
                                |
| @@ 851-864 (lines=14) @@ | ||
| 848 | * sloupečku  | 
                                |
| 849 | * @return array  | 
                                |
| 850 | */  | 
                                |
| 851 | public function getAllFromFlexibee($conditions = null, $indexBy = null)  | 
                                |
| 852 |     { | 
                                |
| 853 |         if (is_int($conditions)) { | 
                                |
| 854 | $conditions = [$this->getmyKeyColumn() => $conditions];  | 
                                |
| 855 | }  | 
                                |
| 856 | ||
| 857 |         $flexiData = $this->getFlexiData('', $conditions); | 
                                |
| 858 | ||
| 859 |         if (!is_null($indexBy)) { | 
                                |
| 860 | $flexiData = $this->reindexArrayBy($flexiData);  | 
                                |
| 861 | }  | 
                                |
| 862 | ||
| 863 | return $flexiData;  | 
                                |
| 864 | }  | 
                                |
| 865 | ||
| 866 | /**  | 
                                |
| 867 | * Vrací z FlexiBee sloupečky podle podmínek.  | 
                                |