@@ 724-736 (lines=13) @@ | ||
721 | * |
|
722 | * @return int počet načtených položek |
|
723 | */ |
|
724 | public function loadFromFlexiBee($id = null) |
|
725 | { |
|
726 | $data = []; |
|
727 | if (is_null($id)) { |
|
728 | $id = $this->getMyKey(); |
|
729 | } |
|
730 | ||
731 | $flexidata = $this->getFlexiData(null, '/'.$id); |
|
732 | if (count($flexidata) == 1) { |
|
733 | $data = current($flexidata); |
|
734 | } |
|
735 | return $this->takeData($data); |
|
736 | } |
|
737 | ||
738 | /** |
|
739 | * Převede data do Json formátu pro FlexiBee. |
|
@@ 810-823 (lines=14) @@ | ||
807 | * sloupečku |
|
808 | * @return array |
|
809 | */ |
|
810 | public function getAllFromFlexibee($conditions = null, $indexBy = null) |
|
811 | { |
|
812 | if (is_int($conditions)) { |
|
813 | $conditions = [$this->getmyKeyColumn() => $conditions]; |
|
814 | } |
|
815 | ||
816 | $flexiData = $this->getFlexiData('', $conditions); |
|
817 | ||
818 | if (!is_null($indexBy)) { |
|
819 | $flexiData = $this->reindexArrayBy($flexiData); |
|
820 | } |
|
821 | ||
822 | return $flexiData; |
|
823 | } |
|
824 | ||
825 | /** |
|
826 | * Vrací z FlexiBee sloupečky podle podmínek. |