eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\ExceptionConversion::publishRoleDraft PHP Method

publishRoleDraft() public method

If the draft was created from an existing role, published version will take the original role ID.
public publishRoleDraft ( mixed $roleDraftId, mixed | null $originalRoleId = null )
$roleDraftId mixed
$originalRoleId mixed | null ID of role the draft was created from. Will be null if the role draft was completely new.
    public function publishRoleDraft($roleDraftId, $originalRoleId = null)
    {
        try {
            return $this->innerGateway->publishRoleDraft($roleDraftId, $originalRoleId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }