Skip to content

Instantly share code, notes, and snippets.

@r-sal
Created June 11, 2014 17:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-sal/aa551f96c7b1925f3fd2 to your computer and use it in GitHub Desktop.
Save r-sal/aa551f96c7b1925f3fd2 to your computer and use it in GitHub Desktop.

CreatePageAction

<?php
use MBITEL\Confluence\EditorActions\CreatePageAction;

$cPager = new CreatePageAction($confluenceClient);
$cPager->createPage($rootPageId);
$cPager->setTextarea($html);
$cPager->setTitle($pageTitle);
$result = $cPager->save();

EditPageAction

<?php
use MBITEL\Confluence\EditorActions\EditPageAction;

$editor = new EditPageAction($confluenceClient);
$editor->editPage($pageId);
$editor->setTextarea($html);
$editor->setTitle($pageTitle);
$result = $editor->save();

CopyPageAction

<?php

RemovePageAction

<?php

WikiConverterAction

Wiki 2 HTML conversion

<?php
use MBITEL\Confluence\PageActions\WikiConverterAction;

$converter = new WikiConverterAction($client);
$html = $converter->wiki2html($wiki);
<?php

AttachFileAction

<?php
use MBITEL\Confluence\PageActions\AttachFileAction;

$files = array(
  'path to file 1',
  'path to file 2',
  'path to file n',
  'path to file n+1'
);

$uploader = new AttachFileAction($confluenceClient);
$uploader->attachFiles($pageId, $files);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment