コード例 #1
0
 public function renameAsset(Asset $a, $new_name, $doWorkflow = false)
 {
     if ($a == NULL) {
         throw new e\NullAssetException(S_SPAN . c\M::NULL_ASSET . E_SPAN);
     }
     if (trim($new_name) == "") {
         throw new e\EmptyValueException(S_SPAN . c\M::EMPTY_NAME . E_SPAN);
     }
     $this->service->move($a->getIdentifier(), $a->getParentContainer()->getIdentifier(), $new_name, $doWorkflow);
     if (!$this->service->isSuccessful()) {
         throw new e\RenamingFailureException(S_SPAN . c\M::RENAME_ASSET_FAILURE . E_SPAN);
     }
     return $this;
 }