You are here

public function CmisConnectionApi::validObjectId in CMIS API 8.2

Same name and namespace in other branches
  1. 8 src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectId()
  2. 3.0.x src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectId()

Check the id is valid object.

Parameters

string $id: CMIS object id.

string $type: CMIS type.

string $parentId: CMIS parent id.

Return value

object the result object or empty array

1 call to CmisConnectionApi::validObjectId()
CmisConnectionApi::getObjectById in src/CmisConnectionApi.php
Get object by object id.

File

src/CmisConnectionApi.php, line 280

Class

CmisConnectionApi
Description of CmisConnectionApi.

Namespace

Drupal\cmis

Code

public function validObjectId($id, $type = 'cmis:folder', $parentId = '') {
  $where = "cmis:objectId='{$id}'";
  if (!empty($parentId)) {
    $where .= " AND IN_FOLDER('{$parentId}')";
  }
  $result = $this->session
    ->queryObjects($type, $where);
  return $result;
}