Deletes the object state group identified by $groupId.
abstract public deleteObjectStateGroup ( mixed $groupId ) | ||
$groupId | mixed |
/** * Deletes a object state group including all states and links to content * * @param mixed $groupId */ public function deleteGroup($groupId) { $objectStates = $this->loadObjectStates($groupId); foreach ($objectStates as $objectState) { $this->objectStateGateway->deleteObjectStateLinks($objectState->id); $this->objectStateGateway->deleteObjectState($objectState->id); } $this->objectStateGateway->deleteObjectStateGroup($groupId); }
/** * Deletes the object state group identified by $groupId. * * @param mixed $groupId */ public function deleteObjectStateGroup($groupId) { try { return $this->innerGateway->deleteObjectStateGroup($groupId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }