public function CmisConnectionApi::validObjectName in CMIS API 8
Same name and namespace in other branches
- 8.2 src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectName()
- 3.0.x src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::validObjectName()
Check the name is valid object.
Parameters
string $name:
string $type:
Return value
object the result object or empty array
File
- src/
CmisConnectionApi.php, line 288
Class
- CmisConnectionApi
- Description of CmisConnectionApi
Namespace
Drupal\cmisCode
public function validObjectName($name, $type = 'cmis:folder', $parentId = '') {
$query = "SELECT * FROM {$type} WHERE cmis:name='{$name}'";
if (!empty($parentId)) {
$query .= " and IN_FOLDER('{$parentId}')";
}
$result = $this->session
->query($query);
return $result;
}