PHP Class eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentTypeContext

Inheritance: implements Behat\Behat\Context\Context, use trait EzSystems\PlatformBehatBundle\Context\RepositoryContext
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$contentTypeGroupContext EzSystems\BehatBundle\Context\Object\ContentTypeGroup
$contentTypeService eZ\Publish\API\Repository\ContentTypeService

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\API\Repository\ContentTypeService $contentTypeService )
assertContentTypeDoesntExistsByIdentifier ( $identifier )
assertContentTypeExistsByIdentifier ( $identifier )
assertContentTypeExistsByIdentifierOnGroup ( $identifier, $groupIdentifier )
createContentType ( string $groupIdentifier, string $identifier, array $fields ) : eZ\Publish\API\Repository\Values\ContentType\ContentType Creates a content type with $identifier on content type group with identifier $groupIdentifier and with the given 'fields' definitions.
ensureContentTypeDoesntExist ( $identifier )
ensureContentTypeWithIndentifier ( $identifier, Behat\Gherkin\Node\TableNode $fields, $groupIdentifier = self::DEFAULT_GROUP )

Protected Methods

Method Description
assignContentGroupTypeToContentType ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup $contentTypeGroup )
checkContentTypeExistenceByIdentifier ( string $identifier, $groupIdentifier = null ) : boolean Verifies that a content type with $identifier exists.
loadContentTypeByIdentifier ( string $identifier, boolean $throwIfNotFound = true ) : eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup | null Load and return a content type by its identifier.
removeContentType ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType ) Remove the given 'ContentType' object.

Method Details

__construct() public method

public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\API\Repository\ContentTypeService $contentTypeService )
$repository eZ\Publish\API\Repository\Repository
$contentTypeService eZ\Publish\API\Repository\ContentTypeService

assertContentTypeDoesntExistsByIdentifier() public method

assertContentTypeExistsByIdentifier() public method

public assertContentTypeExistsByIdentifier ( $identifier )

assertContentTypeExistsByIdentifierOnGroup() public method

public assertContentTypeExistsByIdentifierOnGroup ( $identifier, $groupIdentifier )

assignContentGroupTypeToContentType() protected method

protected assignContentGroupTypeToContentType ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup $contentTypeGroup )
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$contentTypeGroup eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup

checkContentTypeExistenceByIdentifier() protected method

Verifies that a content type with $identifier exists.
protected checkContentTypeExistenceByIdentifier ( string $identifier, $groupIdentifier = null ) : boolean
$identifier string
return boolean

createContentType() public method

Creates a content type with $identifier on content type group with identifier $groupIdentifier and with the given 'fields' definitions.
public createContentType ( string $groupIdentifier, string $identifier, array $fields ) : eZ\Publish\API\Repository\Values\ContentType\ContentType
$groupIdentifier string content type group identifier
$identifier string content type identifier
$fields array content type fields definitions
return eZ\Publish\API\Repository\Values\ContentType\ContentType

ensureContentTypeDoesntExist() public method

public ensureContentTypeDoesntExist ( $identifier )

ensureContentTypeWithIndentifier() public method

public ensureContentTypeWithIndentifier ( $identifier, Behat\Gherkin\Node\TableNode $fields, $groupIdentifier = self::DEFAULT_GROUP )
$fields Behat\Gherkin\Node\TableNode

loadContentTypeByIdentifier() protected method

Load and return a content type by its identifier.
protected loadContentTypeByIdentifier ( string $identifier, boolean $throwIfNotFound = true ) : eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup | null
$identifier string content type identifier
$throwIfNotFound boolean if true, throws an exception if it is not found.
return eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup | null

removeContentType() protected method

Remove the given 'ContentType' object.
protected removeContentType ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType )
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType

Property Details

$contentTypeGroupContext protected_oe property

protected ContentTypeGroup,EzSystems\BehatBundle\Context\Object $contentTypeGroupContext
return EzSystems\BehatBundle\Context\Object\ContentTypeGroup

$contentTypeService protected_oe property

protected ContentTypeService,eZ\Publish\API\Repository $contentTypeService
return eZ\Publish\API\Repository\ContentTypeService