Skip to content
Snippets Groups Projects
Select Git revision
  • 44859f796a65d266a9f1c0dc040b4dcd906dc0fe
  • main default protected
  • v0.2.0
  • v0.1.4
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
8 results

CourseTrait.php

Blame
  • CourseTrait.php 1.42 KiB
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\CourseBundle\Entity;
    
    use ApiPlatform\Core\Annotation\ApiProperty;
    use Symfony\Component\Serializer\Annotation\Groups;
    
    trait CourseTrait
    {
        /**
         * @ApiProperty(identifier=true)
         */
        private $identifier;
    
        /**
         * @ApiProperty(iri="https://schema.org/name")
         * @Groups({"Course:output"})
         *
         * @var string
         */
        private $name;
    
        /**
         * @ApiProperty
         * @Groups({"Course:output"})
         *
         * @var string
         */
        private $type;
    
        /**
         * @ApiProperty(iri="https://schema.org/description")
         * @Groups({"Course:output"})
         *
         * @var string
         */
        private $description;
    
        public function getIdentifier(): string
        {
            return $this->identifier;
        }
    
        public function setIdentifier(string $identifier): void
        {
            $this->identifier = $identifier;
        }
    
        public function getName(): string
        {
            return $this->name;
        }
    
        public function setName(string $name): void
        {
            $this->name = $name;
        }
    
        public function getType(): string
        {
            return $this->type;
        }
    
        public function setType(string $type): void
        {
            $this->type = $type;
        }
    
        public function getDescription(): string
        {
            return $this->description;
        }
    
        public function setDescription(string $description): void
        {
            $this->description = $description;
        }
    }