for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Neimheadh\SonataAnnotationBundle\Annotation\Sonata;
use Attribute;
use Neimheadh\SonataAnnotationBundle\Annotation\AssociationFieldInterface;
/**
* Show association field annotation.
*
* Allows you to configure your show field having an association field.
* @Annotation
* @Target({"PROPERTY"})
* @author Marko Kunic <[email protected]>
* @author Mathieu Wambre <[email protected]>
*/
#[Attribute(Attribute::TARGET_PROPERTY)]
final class ShowAssociationField extends ShowField implements
AssociationFieldInterface
{
* Association field name.
* @var string|null
public ?string $field = null;
* @param string|array|null $type Type or annotation
* parameters.
* @param array $fieldDescriptionOptions Description options.
* @param int|null $position Position.
* @param string|null $field Association field name.
* @throws \ReflectionException
public function __construct(
$type = null,
array $fieldDescriptionOptions = [],
?int $position = null,
?string $field = null
) {
$this->field = $field;
parent::__construct($type, $fieldDescriptionOptions, $position);
}