mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-17 18:16:46 +03:00
107 lines
4.4 KiB
JSON
107 lines
4.4 KiB
JSON
{
|
|
"manifests": {
|
|
"msgphp/eav-bundle": {
|
|
"manifest": {
|
|
"bundles": {
|
|
"MsgPhp\\EavBundle\\MsgPhpEavBundle": [
|
|
"all"
|
|
]
|
|
},
|
|
"copy-from-recipe": {
|
|
"config/": "%CONFIG_DIR%/",
|
|
"src/": "%SRC_DIR%/"
|
|
}
|
|
},
|
|
"files": {
|
|
"config/packages/msgphp_eav.php": {
|
|
"contents": [
|
|
"<?php",
|
|
"",
|
|
"use MsgPhp\\Eav\\Attribute;",
|
|
"use MsgPhp\\Eav\\AttributeValue;",
|
|
"use Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator;",
|
|
"",
|
|
"return function (ContainerConfigurator $container) {",
|
|
" $container->extension('msgphp_eav', [",
|
|
" 'class_mapping' => [",
|
|
" Attribute::class => \\App\\Entity\\Attribute::class,",
|
|
" AttributeValue::class => \\App\\Entity\\AttributeValue::class,",
|
|
" ],",
|
|
" ]);",
|
|
"};",
|
|
""
|
|
],
|
|
"executable": false
|
|
},
|
|
"src/Entity/Attribute.php": {
|
|
"contents": [
|
|
"<?php",
|
|
"",
|
|
"namespace App\\Entity;",
|
|
"",
|
|
"use Doctrine\\ORM\\Mapping as ORM;",
|
|
"use MsgPhp\\Eav\\Attribute as BaseAttribute;",
|
|
"use MsgPhp\\Eav\\AttributeId;",
|
|
"",
|
|
"/**",
|
|
" * @ORM\\Entity()",
|
|
" */",
|
|
"class Attribute extends BaseAttribute",
|
|
"{",
|
|
" /** @ORM\\Id() @ORM\\GeneratedValue() @ORM\\Column(type=\"msgphp_attribute_id\", length=191) */",
|
|
" private $id;",
|
|
"",
|
|
" public function __construct(AttributeId $id)",
|
|
" {",
|
|
" $this->id = $id;",
|
|
" }",
|
|
"",
|
|
" public function getId(): AttributeId",
|
|
" {",
|
|
" return $this->id;",
|
|
" }",
|
|
"}",
|
|
""
|
|
],
|
|
"executable": false
|
|
},
|
|
"src/Entity/AttributeValue.php": {
|
|
"contents": [
|
|
"<?php",
|
|
"",
|
|
"namespace App\\Entity;",
|
|
"",
|
|
"use Doctrine\\ORM\\Mapping as ORM;",
|
|
"use MsgPhp\\Eav\\AttributeValue as BaseAttributeValue;",
|
|
"use MsgPhp\\Eav\\AttributeValueId;",
|
|
"",
|
|
"/**",
|
|
" * @ORM\\Entity()",
|
|
" */",
|
|
"class AttributeValue extends BaseAttributeValue",
|
|
"{",
|
|
" /** @ORM\\Id() @ORM\\GeneratedValue() @ORM\\Column(type=\"msgphp_attribute_value_id\", length=191) */",
|
|
" private $id;",
|
|
"",
|
|
" public function __construct(AttributeValueId $id, Attribute $attribute, $value)",
|
|
" {",
|
|
" parent::__construct($attribute, $value);",
|
|
"",
|
|
" $this->id = $id;",
|
|
" }",
|
|
"",
|
|
" public function getId(): AttributeValueId",
|
|
" {",
|
|
" return $this->id;",
|
|
" }",
|
|
"}",
|
|
""
|
|
],
|
|
"executable": false
|
|
}
|
|
},
|
|
"ref": "9b2774120df769609554a5883df6c3a2224a9761"
|
|
}
|
|
}
|
|
}
|