Class

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext

class ContentContext implements Context, SnippetAcceptingContext

Methods

__construct(Repository $repository)

iCreateAnFolderDraft()

iCreateADraftOfAnExistingContentItem()

Content createContentItem(string $contentTypeIdentifier, array $fields)

Uses a content type identifier + a hash of fields values to create and publish a content item below the root location.

createDraftForContent(Content $content)

getCurrentDraft()

updateDraft($fields)

Content createDraft(string $contentTypeIdentifier, array $fields)

Uses a content type identifier + a hash of fields values to create and publish a draft below the root location.

Details

at line 24
public __construct(Repository $repository)

Parameters

Repository $repository

at line 32
public iCreateAnFolderDraft()

at line 46
public iCreateADraftOfAnExistingContentItem()

at line 65
public Content createContentItem(string $contentTypeIdentifier, array $fields)

Uses a content type identifier + a hash of fields values to create and publish a content item below the root location.

Parameters

string $contentTypeIdentifier
array $fields Hash of field def identifier => field value

Return Value

Content the created content item.

at line 80
public createDraftForContent(Content $content)

Parameters

Content $content

at line 91
public getCurrentDraft()

at line 100
public updateDraft($fields)

Parameters

$fields

at line 128
public Content createDraft(string $contentTypeIdentifier, array $fields)

Uses a content type identifier + a hash of fields values to create and publish a draft below the root location.

Parameters

string $contentTypeIdentifier
array $fields Hash of field def identifier => field value

Return Value

Content the created draft.