@@ 663-675 (lines=13) @@ | ||
660 | * |
|
661 | * @return int počet načtených položek |
|
662 | */ |
|
663 | public function loadFromFlexiBee($id = null) |
|
664 | { |
|
665 | $data = []; |
|
666 | if (is_null($id)) { |
|
667 | $id = $this->getMyKey(); |
|
668 | } |
|
669 | ||
670 | $flexidata = $this->getFlexiData(null, '/'.$id); |
|
671 | if (count($flexidata) == 1) { |
|
672 | $data = current($flexidata); |
|
673 | } |
|
674 | return $this->takeData($data); |
|
675 | } |
|
676 | ||
677 | /** |
|
678 | * Převede data do Json formátu pro FlexiBee. |
|
@@ 742-755 (lines=14) @@ | ||
739 | * sloupečku |
|
740 | * @return array |
|
741 | */ |
|
742 | public function getAllFromFlexibee($conditions = null, $indexBy = null) |
|
743 | { |
|
744 | if (is_int($conditions)) { |
|
745 | $conditions = [$this->getmyKeyColumn() => $conditions]; |
|
746 | } |
|
747 | ||
748 | $flexiData = $this->getFlexiData('', $conditions); |
|
749 | ||
750 | if (!is_null($indexBy)) { |
|
751 | $flexiData = $this->reindexArrayBy($flexiData); |
|
752 | } |
|
753 | ||
754 | return $flexiData; |
|
755 | } |
|
756 | ||
757 | /** |
|
758 | * Vrací z FlexiBee sloupečky podle podmínek. |