mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
In between commit implementing EntityDomServiceTest
This commit is contained in:
@@ -4,6 +4,11 @@ namespace Infinito\Attribut;
|
||||
|
||||
use Infinito\Entity\Meta\Relation\Parent\CreatorRelationInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @see CreatorRelationAttributInterface
|
||||
*/
|
||||
trait CreatorRelationAttribut
|
||||
{
|
||||
/**
|
||||
@@ -11,11 +16,17 @@ trait CreatorRelationAttribut
|
||||
*/
|
||||
protected $creatorRelation;
|
||||
|
||||
/**
|
||||
* @param CreatorRelationInterface $creatorRelation
|
||||
*/
|
||||
public function setCreatorRelation(CreatorRelationInterface $creatorRelation)
|
||||
{
|
||||
$this->creatorRelation = $creatorRelation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CreatorRelationInterface
|
||||
*/
|
||||
public function getCreatorRelation(): CreatorRelationInterface
|
||||
{
|
||||
return $this->creatorRelation;
|
||||
|
@@ -4,9 +4,20 @@ namespace Infinito\Attribut;
|
||||
|
||||
use Infinito\Entity\Meta\Relation\Parent\CreatorRelationInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface CreatorRelationAttributInterface
|
||||
{
|
||||
const CREATORRELATION_ATTRIBUT_NAME = 'creatorRelation';
|
||||
|
||||
/**
|
||||
* @param CreatorRelationInterface $creatorRelation
|
||||
*/
|
||||
public function setCreatorRelation(CreatorRelationInterface $creatorRelation);
|
||||
|
||||
/**
|
||||
* @return CreatorRelationInterface
|
||||
*/
|
||||
public function getCreatorRelation(): CreatorRelationInterface;
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@ namespace Infinito\Attribut;
|
||||
*/
|
||||
interface IdAttributInterface
|
||||
{
|
||||
const ID_ATTRIBUT_NAME = 'id';
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*/
|
||||
|
@@ -4,6 +4,8 @@ namespace Infinito\Attribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @see VersionAttributInterface
|
||||
*/
|
||||
trait VersionAttribut
|
||||
{
|
||||
@@ -12,11 +14,17 @@ trait VersionAttribut
|
||||
*/
|
||||
protected $version;
|
||||
|
||||
/**
|
||||
* @param int $version
|
||||
*/
|
||||
public function setVersion(int $version): void
|
||||
{
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getVersion(): int
|
||||
{
|
||||
return $this->version;
|
||||
|
@@ -12,6 +12,11 @@ namespace Infinito\Attribut;
|
||||
*/
|
||||
interface VersionAttributInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
const VERSION_ATTRIBUT_NAME = 'version';
|
||||
|
||||
/**
|
||||
* Returns the revision version of the entity.
|
||||
*
|
||||
|
@@ -121,8 +121,8 @@ final class EntityDomService implements EntityDomServiceInterface
|
||||
if ($value instanceof $class) {
|
||||
$domElement->setAttribute('layer', $layer);
|
||||
$domElement->setAttribute('id', $value->getId());
|
||||
$domElement->setAttribute('value', $value->getId());
|
||||
$domElement->setAttribute('name', LayerType::getReadableValue($layer));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user