Skip to the content
Documentation

How-to trigger a workflow using the Public API: compariso...

No ratings yet

Versions Compared

Old Version 5

changes.mady.by.user Bertrand Dunogier

Saved on May 23, 2013

compared with

New Version 6

changes.mady.by.user Bertrand Dunogier

Saved on May 23, 2013

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title Create content using the Public API
language php
 $contentType = $contentTypeService->loadContentTypeByIdentifier( $contentTypeIdentifier );

$contentCreateStruct = $contentService->newContentCreateStruct( $contentType, 'eng-GB' );
$contentCreateStruct->setField( 'title', $title );
$contentCreateStruct->setField( 'intro', $intro );
$contentCreateStruct->setField( 'body', $body );

$locationCreateStruct = $locationService->newLocationCreateStruct( $parentLocationId );


// create a draft using the content and location create struct and publish it
$draft = $contentService->createContent( $contentCreateStruct, array( $locationCreateStruct ) );

Publish a Public API draft using the Legacy Kernel

...

Comments

Add a comment

Comments are read by a moderator before they appear.