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

Inheritance: implements Behat\Behat\Context\Context, use trait EzSystems\PlatformBehatBundle\Context\RepositoryContext
Afficher le fichier Open project: ezsystems/ezpublish-kernel

Méthodes publiques

Méthode Description
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\LocationService $locationService )
addValueConstraint ( string $fieldType, string $value, string $constraint ) Adds a validator to the stored field.
createContent ( string $field, mixed $value ) Creates a content and publishes it.
createContentOfThisType ( $field = null, $value = null )
createContentOfThisTypeWithProperties ( $fieldType, Behat\Gherkin\Node\TableNode $properties, $name = null )
createContentTypeWithFieldType ( $fieldType, $name = null )
createContentTypeWithRequiredFieldType ( $fieldType, $name = null )
createField ( string $fieldType, string $name = null, boolean $required = false ) Creates a fieldtype ans stores it for later use.
getFieldContentState ( )
getFieldTypeInternalIdentifier ( string $identifier ) : string Getter method for fieldtype internal identifier.
getFieldValidator ( string $field ) : string Getter method for the validator mappings.
getThisContentId ( ) : integer Get the content id for the published content.
getThisContentName ( string $language = self::DEFAULT_LANGUAGE ) : string Getter method for the name of the stored content.
getThisContentTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string Getter method for the name of the stored contenttype.
getThisFieldTypeIdentifier ( ) : string Getter method for the identifier of the stored fieldtype.
getThisFieldTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string Getter method for the name of the stored fieldtype.
setFieldContentState ( integer $stateFlag, string $field = null, mixed $value = null ) Executes necessary operations to guarantee a given state, recursive function that calls it self to make sure prerequisites are met.

Private Methods

Méthode Description
associateFieldToContentType ( ) Associates the stored fieldtype to the stored contenttype.
createAndPublishContent ( $field, $value ) Creates and publishes the content with a given field and based on the internal ContentType.
createContentType ( ) Creates an instance of a contenttype and stores it for later publishing.
getActualFieldPosition ( ) Getter method for the position of the field, relative to other possible fields.
publishContentType ( ) Publishes the stored contenttype.

Method Details

__construct() public méthode

public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\LocationService $locationService )
$repository eZ\Publish\API\Repository\Repository
$contentTypeService eZ\Publish\API\Repository\ContentTypeService
$contentService eZ\Publish\API\Repository\ContentService
$locationService eZ\Publish\API\Repository\LocationService

addValueConstraint() public méthode

Adds a validator to the stored field.
public addValueConstraint ( string $fieldType, string $value, string $constraint )
$fieldType string Type of the field
$value string Value of the constraint
$constraint string Constraint name

createContent() public méthode

Creates a content and publishes it.
public createContent ( string $field, mixed $value )
$field string Name of the field
$value mixed Value of the field

createContentOfThisType() public méthode

public createContentOfThisType ( $field = null, $value = null )

createContentOfThisTypeWithProperties() public méthode

public createContentOfThisTypeWithProperties ( $fieldType, Behat\Gherkin\Node\TableNode $properties, $name = null )
$properties Behat\Gherkin\Node\TableNode

createContentTypeWithFieldType() public méthode

public createContentTypeWithFieldType ( $fieldType, $name = null )

createContentTypeWithRequiredFieldType() public méthode

public createContentTypeWithRequiredFieldType ( $fieldType, $name = null )

createField() public méthode

Creates a fieldtype ans stores it for later use.
public createField ( string $fieldType, string $name = null, boolean $required = false )
$fieldType string Type of the field
$name string Name of the field, optional, if not specified $fieldType is used
$required boolean True if the is the field required, optional

getFieldContentState() public méthode

getFieldTypeInternalIdentifier() public méthode

Getter method for fieldtype internal identifier.
public getFieldTypeInternalIdentifier ( string $identifier ) : string
$identifier string Identifier of the field
Résultat string internal Identifier of the field

getFieldValidator() public méthode

Getter method for the validator mappings.
public getFieldValidator ( string $field ) : string
$field string Field name
Résultat string field Validator name

getThisContentId() public méthode

Get the content id for the published content.
public getThisContentId ( ) : integer
Résultat integer

getThisContentName() public méthode

Getter method for the name of the stored content.
public getThisContentName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Résultat string Name of the contenttype

getThisContentTypeName() public méthode

Getter method for the name of the stored contenttype.
public getThisContentTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Résultat string Name of the contenttype

getThisFieldTypeIdentifier() public méthode

Getter method for the identifier of the stored fieldtype.
public getThisFieldTypeIdentifier ( ) : string
Résultat string idenfier of the fieldtype

getThisFieldTypeName() public méthode

Getter method for the name of the stored fieldtype.
public getThisFieldTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Résultat string Name of the fieldtype

setFieldContentState() public méthode

Executes necessary operations to guarantee a given state, recursive function that calls it self to make sure prerequisites are met.
public setFieldContentState ( integer $stateFlag, string $field = null, mixed $value = null )
$stateFlag integer Desired state, only predefined constants accepted
$field string Name of the field, optional
$value mixed Value of the field, optional