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

publishRoleDraft() abstract public method

If the draft was created from an existing role, published version will take the original role ID.
abstract 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 abstract function publishRoleDraft($roleDraftId, $originalRoleId = null);

Usage Example

 /**
  * Publish the specified role draft.
  *
  * @param mixed $roleId
  */
 public function publishRoleDraft($roleId)
 {
     try {
         return $this->innerGateway->publishRoleDraft($roleId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway::publishRoleDraft