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