Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Private Attributes | List of all members
eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext Class Reference
Inheritance diagram for eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext:

## Public Member Functions
| __construct (Repository $repository)
| iCreateAnFolderDraft ()
| @Given /^I create an folder draft$/ More...
| iCreateADraftOfAnExistingContentItem ()
| @Given /^I create a draft of an existing content item$/ More...
| createContentItem ($contentTypeIdentifier, array $fields)
| Uses a content type identifier + a hash of fields values to create and publish a content item below the root location. More...
| createDraftForContent (Content $content)
| getCurrentDraft ()
| updateDraft ($fields)
| createDraft ($contentTypeIdentifier, array $fields)
| Uses a content type identifier + a hash of fields values to create and publish a draft below the root location. More...

## Private Attributes
| $currentContent
| $currentDraft
| $repository

## Detailed Description

Definition at line 15 of file ContentContext.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::__construct | ( | Repository | $repository | ) |

Definition at line 26 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\$repository.

## Member Function Documentation

## ◆ createContentItem()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::createContentItem | ( |  | $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

Returns
  Content the created content item.

Definition at line 67 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\$currentContent, and eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createDraft().

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\iCreateADraftOfAnExistingContentItem().

## ◆ createDraft()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::createDraft | ( |  | $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

Returns
  Content the created draft.

Definition at line 130 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\$currentDraft.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createContentItem(), and eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\iCreateAnFolderDraft().

## ◆ createDraftForContent()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::createDraftForContent | ( | Content | $content | ) |

Definition at line 82 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\$currentDraft.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\iCreateADraftOfAnExistingContentItem().

## ◆ getCurrentDraft()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::getCurrentDraft | ( |  | ) |

Definition at line 93 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\$currentDraft.

## ◆ iCreateADraftOfAnExistingContentItem()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::iCreateADraftOfAnExistingContentItem | ( |  | ) |

@Given /^I create a draft of an existing content item$/

Definition at line 48 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createContentItem(), and eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createDraftForContent().

## ◆ iCreateAnFolderDraft()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::iCreateAnFolderDraft | ( |  | ) |

@Given /^I create an folder draft$/

Definition at line 34 of file ContentContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createDraft().

## ◆ updateDraft()

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::updateDraft | ( |  | $fields | ) |

Definition at line 102 of file ContentContext.php.

## Member Data Documentation

## ◆ $currentContent

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::$currentContent
| private

Definition at line 18 of file ContentContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createContentItem().

## ◆ $currentDraft

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::$currentDraft
| private

Definition at line 21 of file ContentContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createDraft(), eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\createDraftForContent(), and eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\getCurrentDraft().

## ◆ $repository

eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext::$repository
| private

Definition at line 24 of file ContentContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext\__construct().

The documentation for this class was generated from the following file:

- ContentContext.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.