public function CmisBrowser::getDocumentProperties in CMIS API 8.2
Same name and namespace in other branches
- 8 src/CmisBrowser.php \Drupal\cmis\CmisBrowser::getDocumentProperties()
- 3.0.x src/CmisBrowser.php \Drupal\cmis\CmisBrowser::getDocumentProperties()
Get document properties.
Return value
array the renderable array
File
- src/
CmisBrowser.php, line 173
Class
- CmisBrowser
- Description of CmisBrowser.
Namespace
Drupal\cmisCode
public function getDocumentProperties() {
if ($this->connection && !empty($this->current)) {
$type_id = $this->current
->getBaseTypeId()
->__toString();
$path = [];
if ($type_id == 'cmis:document') {
$url = Url::fromUserInput('/cmis/document/' . $this->config . '/' . $this->current
->getId());
$path = Link::fromTextAndUrl($this
->t('Download'), $url)
->toRenderable();
}
return [
'#theme' => 'cmis_content_properties',
'#object' => $this->current,
'#download' => render($path),
];
}
}