PHP Класс eZ\Bundle\EzPublishCoreBundle\Features\Context\FieldTypeContext

Наследование: implements Behat\Behat\Context\Context, use trait EzSystems\PlatformBehatBundle\Context\RepositoryContext
Показать файл Открыть проект

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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() публичный Метод

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() публичный Метод

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 createContentOfThisType ( $field = null, $value = null )

createContentOfThisTypeWithProperties() публичный Метод

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

createContentTypeWithFieldType() публичный Метод

public createContentTypeWithFieldType ( $fieldType, $name = null )

createContentTypeWithRequiredFieldType() публичный Метод

public createContentTypeWithRequiredFieldType ( $fieldType, $name = null )

createField() публичный Метод

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() публичный Метод

getFieldTypeInternalIdentifier() публичный Метод

Getter method for fieldtype internal identifier.
public getFieldTypeInternalIdentifier ( string $identifier ) : string
$identifier string Identifier of the field
Результат string internal Identifier of the field

getFieldValidator() публичный Метод

Getter method for the validator mappings.
public getFieldValidator ( string $field ) : string
$field string Field name
Результат string field Validator name

getThisContentId() публичный Метод

Get the content id for the published content.
public getThisContentId ( ) : integer
Результат integer

getThisContentName() публичный Метод

Getter method for the name of the stored content.
public getThisContentName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Результат string Name of the contenttype

getThisContentTypeName() публичный Метод

Getter method for the name of the stored contenttype.
public getThisContentTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Результат string Name of the contenttype

getThisFieldTypeIdentifier() публичный Метод

Getter method for the identifier of the stored fieldtype.
public getThisFieldTypeIdentifier ( ) : string
Результат string idenfier of the fieldtype

getThisFieldTypeName() публичный Метод

Getter method for the name of the stored fieldtype.
public getThisFieldTypeName ( string $language = self::DEFAULT_LANGUAGE ) : string
$language string Language of the name
Результат string Name of the fieldtype

setFieldContentState() публичный Метод

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