| @@ 186-193 (lines=8) @@ | ||
| 183 | * |
|
| 184 | * @return array |
|
| 185 | */ |
|
| 186 | public function getItemByPath(string $path, string $itemId = ''):array |
|
| 187 | { |
|
| 188 | if (empty($itemId)) { |
|
| 189 | return $this->get("Items/ByPath?Path={$path}"); |
|
| 190 | } else { |
|
| 191 | return $this->get("Items({$itemId})/ByPath?Path={$path}"); |
|
| 192 | } |
|
| 193 | } |
|
| 194 | ||
| 195 | /** |
|
| 196 | * Get breadcrumps of an item. |
|
| @@ 439-446 (lines=8) @@ | ||
| 436 | * |
|
| 437 | * @return array |
|
| 438 | */ |
|
| 439 | public function getItemAccessControls(string $itemId, string $userId = ''):array |
|
| 440 | { |
|
| 441 | if (! empty($userId)) { |
|
| 442 | return $this->get("AccessControls(principalid={$userId},itemid={$itemId})"); |
|
| 443 | } else { |
|
| 444 | return $this->get("Items({$itemId})/AccessControls"); |
|
| 445 | } |
|
| 446 | } |
|
| 447 | ||
| 448 | /** |
|
| 449 | * Build API uri. |
|