public function CmisRepositoryController::browse in CMIS API 3.0.x
Same name and namespace in other branches
- 8.2 src/Controller/CmisRepositoryController.php \Drupal\cmis\Controller\CmisRepositoryController::browse()
- 8 src/Controller/CmisRepositoryController.php \Drupal\cmis\Controller\CmisRepositoryController::browse()
Browse.
Parameters
string $config: Entity label.
string $folder_id: CMIS folder id.
Return value
array Return cmis browser render array or warning.
1 string reference to 'CmisRepositoryController::browse'
File
- src/
Controller/ CmisRepositoryController.php, line 64
Class
- CmisRepositoryController
- Class CmisRepositoryController.
Namespace
Drupal\cmis\ControllerCode
public function browse($config = '', $folder_id = '') {
$entity_config = \Drupal::service('cmis.connection_api')
->getConfigFromId($config);
if (empty($this->browser)) {
if ($entity_config
->getCmisRootFolder() && empty($folder_id)) {
$folder_id = $entity_config
->getCmisRootFolder();
}
$this
->initBrowser($config, $folder_id);
}
if (!empty($this->browser
->getCurrent())) {
$cacheable = $this->browser
->getConnection()
->getConfig()
->getCmisCacheable();
return $this->browser
->browse(!$cacheable);
}
return [];
}