public function CmisConnectionApi::validObjectId in CMIS API 8
Same name and namespace in other branches
- 8.2 src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectId()
- 3.0.x src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectId()
Check the id is valid object.
Parameters
string $id:
string $type:
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 268
Class
- CmisConnectionApi
- Description of CmisConnectionApi
Namespace
Drupal\cmisCode
public function validObjectId($id, $type = 'cmis:folder', $parentId = '') {
$query = "SELECT * FROM {$type} WHERE cmis:objectId='{$id}'";
if (!empty($parentId)) {
$query .= " and IN_FOLDER('{$parentId}')";
}
$result = $this->session
->query($query);
return $result;
}