for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Silverback API Components Bundle Project
*
* (c) Daniel West <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Silverback\ApiComponentsBundle\Entity\Core;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\Collection;
use Silverback\ApiComponentsBundle\Annotation as Silverback;
use Silverback\ApiComponentsBundle\Entity\Utility\IdTrait;
use Silverback\ApiComponentsBundle\Entity\Utility\TimestampedTrait;
/**
* @author Daniel West <[email protected]>
* @Silverback\Timestamped
* @ApiResource(attributes={"order"={"sort"="ASC"}})
class ComponentPosition
{
use IdTrait;
use TimestampedTrait;
public ComponentCollection $componentGroup;
* @ApiProperty(writable=false)
public AbstractComponent $component;
public ?int $sortValue = 0;
* @return Collection|AbstractComponent[]|null
public function getSortCollection(): ?Collection
return $this->componentGroup->componentPositions;
}