| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * UserFilesExplorerViewOnAddItem |
|---|
| 5 | * |
|---|
| 6 | * @author Tomasz Świenty |
|---|
| 7 | * @version 0.1 |
|---|
| 8 | * @copyright Copyright (c) eDokumenty |
|---|
| 9 | */ |
|---|
| 10 | final class UserFilesExplorerViewOnAddItem { |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | /** |
|---|
| 14 | * @param $args |
|---|
| 15 | * @return bool |
|---|
| 16 | */ |
|---|
| 17 | public static function init($args) { |
|---|
| 18 | |
|---|
| 19 | // obiekt eksploratora plików |
|---|
| 20 | if (!isset($args['container']) OR (!is_a($args['container'], 'UserFilesExplorerView'))) { |
|---|
| 21 | return FALSE; |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | // dane dodawanego pliku |
|---|
| 25 | $uri = isset($args['uri']) ? $args['uri'] : NULL; |
|---|
| 26 | if (!$uri) { |
|---|
| 27 | return FALSE; |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | // typ ścieżki może być HOME albo PUBLIC |
|---|
| 31 | $pathType = isset($args['pathType']) ? $args['pathType'] : NULL; |
|---|
| 32 | if (!$pathType) { |
|---|
| 33 | return FALSE; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | if (isset($args)) { |
|---|
| 41 | UserFilesExplorerViewOnAddItem::init($args); |
|---|
| 42 | } |
|---|