| @@ 606-618 (lines=13) @@ | ||
| 603 | * |
|
| 604 | * @return int počet načtených položek |
|
| 605 | */ |
|
| 606 | public function loadFromFlexiBee($id = null) |
|
| 607 | { |
|
| 608 | $data = []; |
|
| 609 | if (is_null($id)) { |
|
| 610 | $id = $this->getMyKey(); |
|
| 611 | } |
|
| 612 | ||
| 613 | $flexidata = $this->getFlexiData(null, '/'.$id); |
|
| 614 | if (count($flexidata) == 1) { |
|
| 615 | $data = current($flexidata); |
|
| 616 | } |
|
| 617 | return $this->takeData($data); |
|
| 618 | } |
|
| 619 | ||
| 620 | /** |
|
| 621 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 685-698 (lines=14) @@ | ||
| 682 | * sloupečku |
|
| 683 | * @return array |
|
| 684 | */ |
|
| 685 | public function getAllFromFlexibee($conditions = null, $indexBy = null) |
|
| 686 | { |
|
| 687 | if (is_int($conditions)) { |
|
| 688 | $conditions = [$this->getmyKeyColumn() => $conditions]; |
|
| 689 | } |
|
| 690 | ||
| 691 | $flexiData = $this->getFlexiData('', $conditions); |
|
| 692 | ||
| 693 | if (!is_null($indexBy)) { |
|
| 694 | $flexiData = $this->reindexArrayBy($flexiData); |
|
| 695 | } |
|
| 696 | ||
| 697 | return $flexiData; |
|
| 698 | } |
|
| 699 | ||
| 700 | /** |
|
| 701 | * Vrací z FlexiBee sloupečky podle podmínek. |
|