You are here

public function CmisBrowser::browse in CMIS API 8

Same name and namespace in other branches
  1. 8.2 src/CmisBrowser.php \Drupal\cmis\CmisBrowser::browse()
  2. 3.0.x src/CmisBrowser.php \Drupal\cmis\CmisBrowser::browse()

Browse.

Return value

array Return cmis browser render array.

1 call to CmisBrowser::browse()
CmisBrowser::ajaxCall in src/CmisBrowser.php
Call from ajaxify url.

File

src/CmisBrowser.php, line 236

Class

CmisBrowser
Description of CmisBrowser

Namespace

Drupal\cmis

Code

public function browse($reset = FALSE) {
  if ($this->connection && !empty($this->current)) {
    $this
      ->setBreadcrumbs($this->current, 'last');
    $this
      ->printFolderContent($this->current);
    $table_header = array(
      t('Name'),
      t('Details'),
      t('Author'),
      t('Created'),
      t('Description'),
      t('Operation'),
    );
    $browse = [
      '#theme' => 'cmis_browser',
      '#header' => $table_header,
      '#elements' => $this->data,
      '#breadcrumbs' => $this->breadcrumbs,
      '#operations' => $this
        ->prepareOperations(),
      //'#cache' => $this->cacheable,
      '#attached' => [
        'library' => [
          'cmis/cmis-browser',
        ],
      ],
    ];
    return $browse;
  }
  return [];
}