PHP Интерфейс Sulu\Component\Content\ContentTypeInterface

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Prepare content data for the template.
getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null ) : array Returns default parameters.
getDefaultValue ( ) : mixed returns default value of content type.
getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Return the UUIDs that are referenced by this content type for the given PropertyInterface instance.
getTemplate ( ) : string Returns a template to render a form.
getType ( ) : integer returns type of ContentType PRE_SAVE or POST_SAVE.
getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array Prepare view data (or metadata) for the template.
hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey ) : mixed Checks availability of a value.
read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed Reads the value for given property from the content repository then sets the value of the Sulu property.
remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) Remove the Sulu property from given repository node.
write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, integer $userId, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed Save the value from given property.

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

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

Prepare content data for the template.
public getContentData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Результат array

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

Returns default parameters.
public getDefaultParams ( Sulu\Component\Content\Compat\PropertyInterface $property = null ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Результат array

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

returns default value of content type.
public getDefaultValue ( ) : mixed
Результат mixed

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

Return the UUIDs that are referenced by this content type for the given PropertyInterface instance.
public getReferencedUuids ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Результат array

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

Returns a template to render a form.
public getTemplate ( ) : string
Результат string

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

returns type of ContentType PRE_SAVE or POST_SAVE.
public getType ( ) : integer
Результат integer

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

Prepare view data (or metadata) for the template.
public getViewData ( Sulu\Component\Content\Compat\PropertyInterface $property ) : array
$property Sulu\Component\Content\Compat\PropertyInterface
Результат array

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

Checks availability of a value.
public hasValue ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey
$languageCode
$segmentKey
Результат mixed

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

Reads the value for given property from the content repository then sets the value of the Sulu property.
public read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey string
$languageCode string
$segmentKey string
Результат mixed

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

Remove the Sulu property from given repository node.
public remove ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, string $webspaceKey, string $languageCode, string $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$webspaceKey string
$languageCode string
$segmentKey string

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

Save the value from given property.
public write ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, integer $userId, string $webspaceKey, string $languageCode, string $segmentKey ) : mixed
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$userId integer
$webspaceKey string
$languageCode string
$segmentKey string
Результат mixed