src/Entity/Session.php line 171

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Util\EsUtil;
  4. use Firebase\JWT\JWT;
  5. use App\Entity\VideoGallery;
  6. use App\Annotation\EsUploadable;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use App\Entity\Model\BulletPoint;
  9. use App\Annotation\EsElasticIndex;
  10. use App\Entity\SessionTranslation;
  11. use App\Repository\SessionRepository;
  12. use App\Entity\VideoGalleryTranslation;
  13. use ApiPlatform\Core\Annotation\ApiFilter;
  14. use App\Entity\Traits\TimestampableEntity;
  15. use Doctrine\Common\Collections\Collection;
  16. use ApiPlatform\Core\Annotation\ApiProperty;
  17. use ApiPlatform\Core\Annotation\ApiResource;
  18. use App\Validator\Constraints\IsDuplicateValue;
  19. use App\Entity\Interfaces\UploadMappedInterface;
  20. use Doctrine\Common\Collections\ArrayCollection;
  21. use App\Entity\Interfaces\ElasticMappedInterface;
  22. use App\Entity\Interfaces\SelfMetaMappedInterface;
  23. use App\Entity\Interfaces\ContainerMappedInterface;
  24. use App\Entity\Interfaces\NewsfeedCreatorInterface;
  25. use Symfony\Component\Serializer\Annotation\Groups;
  26. use Symfony\Component\Validator\Constraints as Assert;
  27. use App\Entity\Interfaces\VideoGalleryCreatorInterface;
  28. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\DateFilter;
  29. use Symfony\Component\Serializer\Annotation\SerializedName;
  30. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
  31. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  32. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
  33. use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslatable;
  34. use Locastic\ApiPlatformTranslationBundle\Model\TranslationInterface;
  35. /**
  36.  * @ApiResource(
  37.  *      attributes={"security"="is_granted('ROLE_OPERATOR')", "filters"={"translation.groups"}},
  38.  *      normalizationContext={"groups"={"Session:Read"}, "skip_null_values"=false},
  39.  *      denormalizationContext={"groups"={"Session:Write", "SessionTranslationsGroup"}},
  40.  *      collectionOperations={
  41.  *          "get"={
  42.  *              "normalization_context"={"groups"={"Session:Read"}, "skip_null_values"=false},
  43.  *              "security"="is_granted('ROLE_OPERATOR')"
  44.  *          },
  45.  *          "get_for_select"={
  46.  *              "path"="/sessions/get-for-select",
  47.  *              "method"="GET",
  48.  *              "normalization_context"={"groups"={"Session:Select"}, "skip_null_values"=false},
  49.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  50.  *          },
  51.  *          "get_for_public_page"={
  52.  *              "route_name"="api_pub_sessions_get_for_public_page_collection",
  53.  *              "method"="GET",
  54.  *              "security"="is_granted('PUBLIC_ACCESS')",
  55.  *              "normalization_context"={"groups"={"Session:PRead"}, "skip_null_values"=false},
  56.  *              "pagination_enabled"=true
  57.  *          },
  58.  *          "get_agenda"={
  59.  *              "path"="/sessions/get-agenda",
  60.  *              "method"="GET",
  61.  *              "pagination_enabled"=false,
  62.  *              "normalization_context"={"groups"={"Session:Read"}, "skip_null_values"=false},
  63.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  64.  *          },
  65.  *          "get_session"={
  66.  *              "path"="/sessions/get-session",
  67.  *              "method"="GET",
  68.  *              "pagination_enabled"=false,
  69.  *              "normalization_context"={"groups"={"Session:Read"}, "skip_null_values"=false},
  70.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  71.  *          },
  72.  *          "get_user_session"={
  73.  *              "path"="/sessions/get-user-session",
  74.  *              "method"="GET",
  75.  *              "normalization_context"={"groups"={"Session:Read-Watched"}, "skip_null_values"=false},
  76.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  77.  *          },
  78.  *          "get_live_session"={
  79.  *              "path"="/sessions/get-live-session",
  80.  *              "method"="GET",
  81.  *              "pagination_enabled"=false,
  82.  *              "normalization_context"={"groups"={"Session:Read"}, "skip_null_values"=false},
  83.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  84.  *          },
  85.  *          "get_video_library"={
  86.  *              "path"="/sessions/get-video-library",
  87.  *              "method"="GET",
  88.  *              "normalization_context"={"groups"={"Session:VideoLibrary"}, "skip_null_values"=false},
  89.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  90.  *          },
  91.  *          "get_for_video_gallery"={
  92.  *              "path"="/sessions/get-for-video-gallery",
  93.  *              "method"="GET",
  94.  *              "normalization_context"={"groups"={"Session:VideoGallery"}, "skip_null_values"=false},
  95.  *              "pagination_use_output_walkers"=true
  96.  *          },
  97.  *          "get_item"={
  98.  *              "path"="/sessions/get-item",
  99.  *              "method"="GET",
  100.  *              "normalization_context"={"groups"={"Session:Read", "Session:GetItem"}, "skip_null_values"=false},
  101.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  102.  *          },
  103.  *          "get_item_detail"={
  104.  *              "path"="/sessions/get-item-detail",
  105.  *              "method"="GET",
  106.  *              "normalization_context"={"groups"={"Session:GetItemDetail"}, "skip_null_values"=false},
  107.  *              "security"="is_granted('IS_AUTHENTICATED_FULLY')"
  108.  *          },
  109.  *          "post",
  110.  *          "post_change_card_size"={
  111.  *              "route_name"="api_sessions_change_card_size_collection",
  112.  *              "method"="POST",
  113.  *              "denormalization_context"={"groups"={"Session:CardSize"}}
  114.  *          },
  115.  *          "post_sc_exist"={
  116.  *              "route_name"="api_sessions_sc_exist_collection",
  117.  *              "method"="POST",
  118.  *              "denormalization_context"={"groups"={"Session:Sc-Exist"}, "skip_null_values"=false}
  119.  *          }
  120.  *      },
  121.  *      itemOperations={
  122.  *          "get"={
  123.  *              "security"="is_granted('IS_CO_ANY', object)",
  124.  *              "normalization_context"={"groups"={"Session:Read", "Session:GetItem"}, "skip_null_values"=false}
  125.  *          },
  126.  *          "get_last_session"={
  127.  *              "route_name"="api_sessions_get_last_item",
  128.  *              "method"="GET",
  129.  *              "security"="is_granted('IS_CO_OPR', object)"
  130.  *          },
  131.  *          "put"={"security"="is_granted('IS_CO_OPR', object)"},
  132.  *          "patch"={"security"="is_granted('IS_CO_OPR', object)"},
  133.  *          "patch_set_delay"={
  134.  *              "route_name"="api_sessions_set_delay_item",
  135.  *              "method"="PATCH",
  136.  *              "denormalization_context"={"groups"={"Session:SetDelay"}},
  137.  *              "security"="is_granted('IS_CO_OPR', object)"
  138.  *          },
  139.  *          "patch_end_session"={
  140.  *              "route_name"="api_sessions_end_session_item",
  141.  *              "method"="PATCH",
  142.  *              "denormalization_context"={"groups"={"Session:EndSession"}},
  143.  *              "security"="is_granted('IS_CO_OPR', object)"
  144.  *          },
  145.  *          "patch_extend_session"={
  146.  *              "path"="/sessions/{id}/extend-session",
  147.  *              "method"="PATCH",
  148.  *              "denormalization_context"={"groups"={"Session:ExtendSession"}},
  149.  *              "security"="is_granted('IS_CO_OPR', object)"
  150.  *          },
  151.  *          "delete"={"security"="is_granted('IS_CO_OPR', object)"}
  152.  *     }
  153.  * )
  154.  * @ApiFilter(SearchFilter::class, properties={"id": "exact", "container.id": "exact", "conference.id": "exact", "sessionTags.id": "exact", "translations.title": "partial", "sessionCategory.id": "exact", "speakers.id": "exact", "moderators.id": "exact", "speakers.roles": "exact", "moderators.roles": "exact", "streamType": "exact", "watchTimes.user.id": "exact"})
  155.  * @ApiFilter(BooleanFilter::class, properties={"isVisible", "isShowInVideoLibrary", "isLive", "isReply", "isAskSpeakerEnable", "isLastOfTheDay"})
  156.  * @ApiFilter(DateFilter::class, properties={"start", "end"})
  157.  * @ApiFilter(OrderFilter::class, properties={"translations.title": "ASC", "start", "watchTimes.start", "conference.translations.title"})
  158.  * @ORM\Entity(repositoryClass=SessionRepository::class)
  159.  * @ORM\Table(
  160.  *      indexes={
  161.  *          @ORM\Index(name="session_ord_idx", columns={"ord"}),
  162.  *          @ORM\Index(name="session_start_idx", columns={"start"}),
  163.  *          @ORM\Index(name="session_end_idx", columns={"end"})
  164.  *      }
  165.  * )
  166.  * @EsElasticIndex("Session:EL")
  167.  */
  168. class Session extends AbstractTranslatable implements ContainerMappedInterfaceUploadMappedInterfaceNewsfeedCreatorInterfaceSelfMetaMappedInterfaceVideoGalleryCreatorInterfaceElasticMappedInterface
  169. {
  170.     /**
  171.      * Hook timestampable behavior
  172.      * updates createdAt, updatedAt fields
  173.      */
  174.     use TimestampableEntity;
  175.     /**
  176.      * @ORM\OneToMany(targetEntity="SessionTranslation", mappedBy="translatable", fetch="EXTRA_LAZY", indexBy="locale", cascade={"PERSIST"}, orphanRemoval=true)
  177.      *
  178.      * @Groups({"Session:EL", "Session:Write", "SessionTranslationsGroup"})
  179.      * @Assert\Valid()
  180.      */
  181.     protected $translations;
  182.     /**
  183.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Read-Watched", "Session:Select", "Session:VideoGallery", "Session:VideoLibrary", "WatchTime:Read", "VoteQuestion:Read", "SessionComment:Read", "SessionQuestion:Read", "SessionQuestion:Exp", "VoteResult:Exp", "ElTask:Read", "ElExam:Read"})
  184.      */
  185.     private $title;
  186.     /**
  187.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:VideoLibrary", "Session:Select", "ElTask:Read"})
  188.      */
  189.     private $description;
  190.     /**
  191.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:VideoLibrary", "Session:Select", "ElTask:Read", "ElExam:Read-Solution"})
  192.      */
  193.     private $streamUrl;
  194.     /**
  195.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:VideoLibrary", "Session:Select", "ElTask:Read", "ElExam:Read-Solution"})
  196.      */
  197.     private $onsiteMessage;
  198.     /**
  199.      * @ORM\Id
  200.      * @ORM\GeneratedValue
  201.      * @ORM\Column(type="integer")
  202.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Read-Watched", "Session:Select", "Session:VideoGallery", "Session:VideoLibrary", "WatchTime:Read", "VoteQuestion:Read", "ElTask:Read", "ElExam:Read"})
  203.      */
  204.     private $id;
  205.     /**
  206.      * @ORM\Column(type="boolean", nullable=true)
  207.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write", "Session:VideoLibrary"})
  208.      *
  209.      * @Assert\Type(type="bool", message="validation.session:isVisible.typeBool")
  210.      */
  211.     private $isVisible;
  212.     /**
  213.      * @ORM\Column(type="datetime")
  214.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Read-Watched", "Session:Select", "Session:Write", "Session:VideoGallery", "Session:VideoLibrary", "ElTask:Read"})
  215.      *
  216.      * @Assert\NotBlank(message="validation.session:start.notBlank")
  217.      */
  218.     private $start;
  219.     /**
  220.      * @ORM\Column(type="datetime")
  221.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Read-Watched", "Session:Select", "Session:Write", "Session:VideoGallery", "Session:VideoLibrary", "ElTask:Read"})
  222.      *
  223.      * @Assert\NotBlank(message="validation.session:end.notBlank")
  224.      */
  225.     private $end;
  226.     /**
  227.      * @ORM\ManyToOne(targetEntity=Container::class)
  228.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  229.      *
  230.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Write", "Session:PRead"})
  231.      */
  232.     private $container;
  233.     /**
  234.      * @ORM\Column(type="string", length=255, nullable=true)
  235.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Read-Watched", "Session:Select", "Session:Write", "Session:VideoGallery", "Session:VideoLibrary", "ElTask:Read", "ElExam:Read"})
  236.      *
  237.      * @Assert\Length(max=255, maxMessage="validation.session:imageName.max")
  238.      * @EsUploadable()
  239.      */
  240.     protected $imageName;
  241.     /**
  242.      * @ORM\ManyToOne(targetEntity=Conference::class, inversedBy="sessions")
  243.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  244.      *
  245.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Read-Watched", "Session:Write", "Session:VideoGallery", "Session:VideoLibrary", "VoteQuestion:Read", "SessionQuestion:Read", "ElTask:Read", "ElExam:Read"})
  246.      */
  247.     private $conference;
  248.     /**
  249.      * @ORM\OneToMany(targetEntity=SessionComment::class, mappedBy="session", orphanRemoval=true)
  250.      */
  251.     private $sessionComments;
  252.     /**
  253.      * @ORM\ManyToMany(targetEntity=SessionTag::class, inversedBy="sessions", cascade={"persist"})
  254.      *
  255.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write", "Session:VideoLibrary"})
  256.      */
  257.     private $sessionTags;
  258.     /**
  259.      * @ORM\OneToMany(targetEntity=SessionDoc::class, mappedBy="session", orphanRemoval=true, cascade={"persist"})
  260.      *
  261.      * @Groups({"Session:Read", "Session:Write"})
  262.      */
  263.     private $sessionDocs;
  264.     /**
  265.      * @ORM\ManyToOne(targetEntity=CommonCategory::class)
  266.      * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
  267.      *
  268.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Read-Watched", "Session:Agenda", "Session:Write"})
  269.      */
  270.     private $sessionCategory;
  271.     /**
  272.      * @ORM\Column(type="boolean", nullable=true)
  273.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  274.      *
  275.      * @Assert\Type(type="bool", message="validation.session:isCommentEnable.typeBool")
  276.      */
  277.     private $isCommentEnable;
  278.     /**
  279.      * @ORM\Column(type="boolean", nullable=true)
  280.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  281.      *
  282.      * @Assert\Type(type="bool", message="validation.session:isCommentModerated.typeBool")
  283.      */
  284.     private $isCommentModerated;
  285.     /**
  286.      * @ORM\Column(type="boolean", nullable=true)
  287.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  288.      *
  289.      * @Assert\Type(type="bool", message="validation.session:isSharingEnable.typeBool")
  290.      */
  291.     private $isSharingEnable;
  292.     /**
  293.      * @ORM\Column(type="boolean", nullable=true)
  294.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  295.      *
  296.      * @Assert\Type(type="bool", message="validation.session:isLikeEnable.typeBool")
  297.      */
  298.     private $isLikeEnable;
  299.     /**
  300.      * @ORM\Column(type="boolean", nullable=true)
  301.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  302.      *
  303.      * @Assert\Type(type="bool", message="validation.session:isJoinRequired.typeBool")
  304.      */
  305.     private $isJoinRequired;
  306.     /**
  307.      * @ORM\Column(type="boolean", nullable=true)
  308.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  309.      *
  310.      * @Assert\Type(type="bool", message="validation.session:isSessionPublic.typeBool")
  311.      */
  312.     private $isSessionPublic;
  313.     /**
  314.      * @ORM\Column(type="boolean", nullable=true)
  315.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  316.      *
  317.      * @Assert\Type(type="bool", message="validation.session:isExternalLinkEnable.typeBool")
  318.      */
  319.     private $isExternalLinkEnable;
  320.     /**
  321.      * @ORM\Column(type="string", length=255, nullable=true)
  322.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  323.      *
  324.      * @Assert\Length(max=255, maxMessage="validation.session:externalLinkLabel.max")
  325.      */
  326.     private $externalLinkLabel;
  327.     /**
  328.      * @ORM\Column(type="string", length=255, nullable=true)
  329.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  330.      *
  331.      * @Assert\Length(max=255, maxMessage="validation.session:externalLinkUrl.max")
  332.      */
  333.     private $externalLinkUrl;
  334.     /**
  335.      * @ORM\Column(type="boolean", nullable=true)
  336.      * @Groups({"Session:Read", "Session:Write"})
  337.      *
  338.      * @Assert\Type(type="bool", message="validation.session:isVisible.typeBool")
  339.      */
  340.     private $isShowInVideoLibrary;
  341.     /**
  342.      * @ORM\Column(type="boolean", nullable=true)
  343.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  344.      *
  345.      * @Assert\Type(type="bool", message="validation.session:isVisible.typeBool")
  346.      */
  347.     private $isSessionAutoSwitch;
  348.     /**
  349.      * @ORM\ManyToMany(targetEntity=User::class)
  350.      * @ORM\JoinTable(name="rel_session_speaker")
  351.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "SessionQuestion:Read", "Session:Select"})
  352.      * @ORM\OrderBy({"lastName" = "ASC"})
  353.      */
  354.     private $speakers;
  355.     /**
  356.      * @ORM\ManyToMany(targetEntity=User::class)
  357.      * @ORM\JoinTable(name="rel_session_moderator")
  358.      * @Groups({"Session:EL", "Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Write", "SessionQuestion:Read"})
  359.      * @ORM\OrderBy({"lastName" = "ASC"})
  360.      */
  361.     private $moderators;
  362.     /**
  363.      * @ORM\Column(type="string", length=32, nullable=true)
  364.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read", "ElExam:Read-Solution"})
  365.      */
  366.     private $streamType;
  367.     public const STREAMTYPE_YOUTUBE "YOUTUBE";
  368.     public const STREAMTYPE_VIMEO "VIMEO";
  369.     public const STREAMTYPE_SWISSCOM "SWISSCOM";
  370.     public const STREAMTYPE_DACAST "DACAST";
  371.     public const STREAMTYPE_KNOVIO "KNOVIO";
  372.     public const STREAMTYPE_ZOOM "ZOOM";
  373.     public const STREAMTYPE_WEBEX "WEBEX";
  374.     public const STREAMTYPE_FILE "FILE";
  375.     public const STREAMTYPE_EXPERTSHARE "EXPERTSHARE";
  376.     public const STREAMTYPE_QUMU "QUMU";
  377.     /**
  378.      * @ORM\Column(type="string", length=255, nullable=true)
  379.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read"})
  380.      *
  381.      * @Assert\Length(max=255, maxMessage="validation.session:zoomUrl.max")
  382.      */
  383.     private $zoomUrl;
  384.     /**
  385.      * @ORM\Column(type="string", length=255, nullable=true)
  386.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read"})
  387.      *
  388.      * @Assert\Length(max=255, maxMessage="validation.session:zoomMeetingNumber.max")
  389.      */
  390.     private $zoomMeetingNumber;
  391.     /**
  392.      * @ORM\Column(type="string", length=255, nullable=true)
  393.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read"})
  394.      *
  395.      * @Assert\Length(max=255, maxMessage="validation.session:zoomMeetingPassword.max")
  396.      */
  397.     private $zoomMeetingPassword;
  398.     /**
  399.      * @ORM\Column(type="string", length=255, nullable=true)
  400.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read"})
  401.      *
  402.      * @Assert\Length(max=255, maxMessage="validation.session:webexUrl.max")
  403.      */
  404.     private $webexUrl;
  405.     /**
  406.      * @ORM\Column(type="string", length=255, nullable=true)
  407.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:VideoLibrary", "ElTask:Read"})
  408.      *
  409.      * @Assert\Length(max=255, maxMessage="validation.session:webexMeetingPassword.max")
  410.      */
  411.     private $webexMeetingPassword;
  412.     /**
  413.      * @ORM\Column(type="string", length=32, nullable=true)
  414.      * @ApiProperty(
  415.      *     attributes={
  416.      *         "openapi_context"={
  417.      *             "type"="string",
  418.      *             "enum"={self::CARDSIZE_SMALL, self::CARDSIZE_MEDIUM, self::CARDSIZE_LARGE, self::CARDSIZE_XLARGE, self::CARDSIZE_COMPACT}
  419.      *         }
  420.      *     }
  421.      * )
  422.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:CardSize", "Session:PRead"})
  423.      *
  424.      * @Assert\Choice({self::CARDSIZE_SMALL, self::CARDSIZE_MEDIUM, self::CARDSIZE_LARGE, self::CARDSIZE_XLARGE, self::CARDSIZE_COMPACT})
  425.      */
  426.     private $cardSize;
  427.     public const CARDSIZE_SMALL "SMALL";
  428.     public const CARDSIZE_MEDIUM "MEDIUM";
  429.     public const CARDSIZE_LARGE "LARGE";
  430.     public const CARDSIZE_XLARGE "XLARGE";
  431.     public const CARDSIZE_COMPACT "COMPACT";
  432.     /**
  433.      * @ORM\Column(type="string", length=32, nullable=true)
  434.      * @ApiProperty(
  435.      *     attributes={
  436.      *         "openapi_context"={
  437.      *             "type"="string",
  438.      *             "enum"={self::CARDTYPE_COMPACT, self::CARDTYPE_DETAIL}
  439.      *         }
  440.      *     }
  441.      * )
  442.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write", "Session:PRead"})
  443.      *
  444.      * @Assert\Choice({self::CARDTYPE_COMPACT, self::CARDTYPE_DETAIL})
  445.      */
  446.     private $cardType;
  447.     public const CARDTYPE_COMPACT "COMPACT";
  448.     public const CARDTYPE_DETAIL "DETAIL";
  449.     /**
  450.      * @ORM\Column(type="integer", nullable=true)
  451.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Write", "Session:VideoLibrary"})
  452.      *
  453.      * @Assert\Type(type="integer", message="validation.session:ord.typeInteger")
  454.      */
  455.     private $ord;
  456.     /**
  457.      * @Groups({"Session:CardSize"})
  458.      */
  459.     private array $ids;
  460.     /**
  461.      * @ORM\ManyToMany(targetEntity=UserGroup::class, inversedBy="sessions")
  462.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  463.      */
  464.     private $userGroups;
  465.     /**
  466.      * @ORM\Column(type="boolean", nullable=true)
  467.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Agenda", "Session:Write"})
  468.      */
  469.     private $isReply;
  470.     /**
  471.      * @ORM\Column(type="boolean", nullable=true)
  472.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:Write", "ElTask:Read"})
  473.      */
  474.     private $isLive;
  475.     /**
  476.      * @ORM\OneToMany(targetEntity=SessionQuestion::class, mappedBy="session", orphanRemoval=true)
  477.      */
  478.     private $sessionQuestions;
  479.     /**
  480.      * @ORM\Column(type="boolean", nullable=true)
  481.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  482.      */
  483.     private $isQuestionEnable;
  484.     /**
  485.      * @ORM\Column(type="boolean", nullable=true)
  486.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  487.      */
  488.     private $isAnswerEnable;
  489.     /**
  490.      * @ORM\Column(type="boolean", nullable=true)
  491.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  492.      */
  493.     private $isQuestionModerated;
  494.     /**
  495.      * @ORM\Column(type="boolean", nullable=true)
  496.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  497.      *
  498.      * @Assert\Type(type="bool", message="validation.session:isAskSpeakerEnable.typeBool")
  499.      */
  500.     private $isAskSpeakerEnable;
  501.     /**
  502.      * @ORM\Column(type="boolean", nullable=true)
  503.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  504.      *
  505.      * @Assert\Type(type="bool", message="validation.session:isAskSpeakerPublicEnable.typeBool")
  506.      */
  507.     private $isAskSpeakerPublicEnable;
  508.     /**
  509.      * @ORM\OneToMany(targetEntity=WatchTime::class, mappedBy="session", orphanRemoval=true)
  510.      */
  511.     private $watchTimes;
  512.     /**
  513.      * @ORM\Column(type="boolean", nullable=true)
  514.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  515.      */
  516.     private $isSendReminder;
  517.     /**
  518.      * @ORM\OneToMany(targetEntity=CommonComment::class, mappedBy="session")
  519.      */
  520.     private $commonComments;
  521.     /**
  522.      * @ORM\Column(type="json", nullable=true)
  523.      * @Groups({"Session:Read", "Session:Read-Watched", "Session:Read-Public"})
  524.      */
  525.     private $meta = [];
  526.     /**
  527.      * @ORM\Column(type="boolean", nullable=true)
  528.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  529.      */
  530.     private $isShowPublic;
  531.     /**
  532.      * @ORM\Column(type="integer", nullable=true)
  533.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Read-Watched", "Session:Read-Public"})
  534.      */
  535.     private $totalReactions;
  536.     /**
  537.      * @ORM\Column(type="array", nullable=true)
  538.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Read-Watched", "Session:Read-Public"})
  539.      */
  540.     private $totalReactionsByType = [];
  541.     /**
  542.      * @ORM\Column(type="boolean", nullable=true)
  543.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write", "Session:Read-Watched", "Session:Read-Public"})
  544.      */
  545.     private $isSessionReactionEnable;
  546.     /**
  547.      * @Groups({"Session:SetDelay"})
  548.      */
  549.     private int $delay 0;
  550.     /**
  551.      * @ORM\OneToMany(targetEntity=SessionChapter::class, mappedBy="session", orphanRemoval=true)
  552.      * @Groups({"Session:GetItem"})
  553.      */
  554.     private $sessionChapters;
  555.     /**
  556.      * @ORM\Column(type="array", nullable=true)
  557.      * @Groups({"Session:EL", "Session:Read", "Session:Write", "Session:GetItemDetail", "Session:PRead", "Session:Agenda", "Session:VideoLibrary", "Session:Select", "ElTask:Read"})
  558.      */
  559.     private $bulletPoints = [];
  560.     /**
  561.      * @ORM\ManyToOne(targetEntity=VideoGallery::class)
  562.      * @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
  563.      * @Groups({"Session:GetItem"})
  564.      */
  565.     private $videoGallery;
  566.     /**
  567.      * @ORM\Column(type="boolean", nullable=true)
  568.      * @Groups({"Session:Read", "Session:Write"})
  569.      */
  570.     private $isNotConsiderForCertificate;
  571.     /**
  572.      * @ORM\OneToMany(targetEntity=VoteQuestion::class, mappedBy="session")
  573.      * @Groups({"Session:GetItemDetail"})
  574.      */
  575.     private $voteQuestions;
  576.     /**
  577.      * @ORM\Column(type="integer", nullable=true)
  578.      */
  579.     private $oldId;
  580.     /**
  581.      * @ORM\Column(type="string", length=32, nullable=true)
  582.      * @Groups({"Session:Read", "Session:Write", "Session:GetItemDetail", "Session:Select", "VoteQuestion:Read", "Session:Sc-Exist"})
  583.      * @IsDuplicateValue(field="shortCode", entityName=self::class)
  584.      */
  585.     private $shortCode;
  586.     /**
  587.      * @Groups({"Session:Sc-Exist"})
  588.      */
  589.     private $currentId;
  590.     /**
  591.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  592.      */
  593.     private $nextSession;
  594.     /**
  595.      * @ORM\Column(type="datetime", nullable=true)
  596.      * @Groups({"Session:Read", "Session:ExtendSession"})
  597.      */
  598.     private $lastExtendAt;
  599.     /**
  600.      * @ORM\Column(type="boolean", nullable=true)
  601.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  602.      */
  603.     private $isLastOfTheDay;
  604.     /**
  605.      * @ORM\Column(type="boolean", nullable=true)
  606.      * @Groups({"Session:Read", "Session:GetItemDetail", "Session:Write"})
  607.      */
  608.     private $isOnsite;
  609.     public function __construct()
  610.     {
  611.         parent::__construct();
  612.         $this->sessionComments = new ArrayCollection();
  613.         $this->sessionTags = new ArrayCollection();
  614.         $this->sessionDocs = new ArrayCollection();
  615.         $this->speakers = new ArrayCollection();
  616.         $this->moderators = new ArrayCollection();
  617.         $this->userGroups = new ArrayCollection();
  618.         $this->sessionQuestions = new ArrayCollection();
  619.         $this->watchTimes = new ArrayCollection();
  620.         $this->commonComments = new ArrayCollection();
  621.         $this->sessionChapters = new ArrayCollection();
  622.         $this->voteQuestions = new ArrayCollection();
  623.         $bulletPointModel = new BulletPoint();
  624.         $this->bulletPoints $bulletPointModel->getProperties();
  625.     }
  626.     protected function createTranslation(): TranslationInterface
  627.     {
  628.         return new SessionTranslation();
  629.     }
  630.     public function addTranslation(TranslationInterface $translation): void
  631.     {
  632.         $this->setUpdatedAt(new \DateTime());
  633.         parent::addTranslation($translation);
  634.     }
  635.     public function getTitle(): ?string
  636.     {
  637.         return $this->getTranslation()->getTitle();
  638.     }
  639.     public function setTitle(string $title): self
  640.     {
  641.         $this->getTranslation()->setTitle($title);
  642.         return $this;
  643.     }
  644.     public function getDescription(): ?string
  645.     {
  646.         return $this->getTranslation()->getDescription();
  647.     }
  648.     public function setDescription(string $description): self
  649.     {
  650.         $this->getTranslation()->setDescription($description);
  651.         return $this;
  652.     }
  653.     public function getStreamUrl(): ?string
  654.     {
  655.         return $this->getTranslation()->getStreamUrl();
  656.     }
  657.     public function setStreamUrl(string $streamUrl): self
  658.     {
  659.         $this->getTranslation()->setStreamUrl($streamUrl);
  660.         return $this;
  661.     }
  662.     public function getOnsiteMessage(): ?string
  663.     {
  664.         return $this->getTranslation()->getOnsiteMessage();
  665.     }
  666.     public function setOnsiteMessage(string $onsiteMessage): self
  667.     {
  668.         $this->getTranslation()->setOnsiteMessage($onsiteMessage);
  669.         return $this;
  670.     }
  671.     public function getId(): ?int
  672.     {
  673.         return $this->id;
  674.     }
  675.     public function getIsVisible(): ?bool
  676.     {
  677.         return $this->isVisible;
  678.     }
  679.     public function setIsVisible(?bool $isVisible): self
  680.     {
  681.         $this->isVisible $isVisible;
  682.         return $this;
  683.     }
  684.     public function getStart(): ?\DateTimeInterface
  685.     {
  686.         return $this->start;
  687.     }
  688.     public function setStart(\DateTimeInterface $start): self
  689.     {
  690.         $this->start $start;
  691.         return $this;
  692.     }
  693.     public function getEnd(): ?\DateTimeInterface
  694.     {
  695.         return $this->end;
  696.     }
  697.     public function setEnd(\DateTimeInterface $end): self
  698.     {
  699.         $this->end $end;
  700.         return $this;
  701.     }
  702.     public function getContainer(): ?Container
  703.     {
  704.         return $this->container;
  705.     }
  706.     public function setContainer(?Container $container): self
  707.     {
  708.         $this->container $container;
  709.         return $this;
  710.     }
  711.     public function getImageName(): ?string
  712.     {
  713.         return $this->imageName;
  714.     }
  715.     public function setImageName(?string $imageName): self
  716.     {
  717.         $this->imageName $imageName;
  718.         return $this;
  719.     }
  720.     public function getConference(): ?Conference
  721.     {
  722.         return $this->conference;
  723.     }
  724.     public function setConference(?Conference $conference): self
  725.     {
  726.         $this->conference $conference;
  727.         return $this;
  728.     }
  729.     /**
  730.      * @return Collection|SessionComment[]
  731.      */
  732.     public function getSessionComments(): Collection
  733.     {
  734.         return $this->sessionComments;
  735.     }
  736.     public function addSessionComment(SessionComment $sessionComment): self
  737.     {
  738.         if (!$this->sessionComments->contains($sessionComment)) {
  739.             $this->sessionComments[] = $sessionComment;
  740.             $sessionComment->setSession($this);
  741.         }
  742.         return $this;
  743.     }
  744.     public function removeSessionComment(SessionComment $sessionComment): self
  745.     {
  746.         if ($this->sessionComments->removeElement($sessionComment)) {
  747.             // set the owning side to null (unless already changed)
  748.             if ($sessionComment->getSession() === $this) {
  749.                 $sessionComment->setSession(null);
  750.             }
  751.         }
  752.         return $this;
  753.     }
  754.     /**
  755.      * @return Collection|SessionTag[]
  756.      */
  757.     public function getSessionTags(): Collection
  758.     {
  759.         return $this->sessionTags;
  760.     }
  761.     /**
  762.      * @Groups({"Session:EL"})
  763.      * @SerializedName("tags")
  764.      */
  765.     public function getTagsArray()
  766.     {
  767.         $tags = [];
  768.         foreach ($this->sessionTags as $tag) {
  769.             $tags[] = $tag->getName();
  770.         }
  771.         return $tags;
  772.     }
  773.     public function addSessionTag(SessionTag $sessionTag): self
  774.     {
  775.         if (!$this->sessionTags->contains($sessionTag)) {
  776.             $this->sessionTags[] = $sessionTag;
  777.         }
  778.         return $this;
  779.     }
  780.     public function removeSessionTag(SessionTag $sessionTag): self
  781.     {
  782.         $this->sessionTags->removeElement($sessionTag);
  783.         return $this;
  784.     }
  785.     public function removeAllSessionTags(): self
  786.     {
  787.         foreach ($this->sessionTags as $tag) {
  788.             $this->removeSessionTag($tag);
  789.         }
  790.         return $this;
  791.     }
  792.     public function reAttachTags(): self
  793.     {
  794.         $tags $this->sessionTags;
  795.         foreach ($tags as $tag) {
  796.             $nt = clone $tag;
  797.             $nt->setContainer($this->getContainer());
  798.             $this->removeSessionTag($tag);
  799.             $this->addSessionTag($nt);
  800.         }
  801.         return $this;
  802.     }
  803.     /**
  804.      * @return Collection|SessionDoc[]
  805.      */
  806.     public function getSessionDocs(): Collection
  807.     {
  808.         return $this->sessionDocs;
  809.     }
  810.     public function addSessionDoc(SessionDoc $sessionDoc): self
  811.     {
  812.         if (!$this->sessionDocs->contains($sessionDoc)) {
  813.             $this->sessionDocs[] = $sessionDoc;
  814.             $sessionDoc->setSession($this);
  815.         }
  816.         return $this;
  817.     }
  818.     public function removeSessionDoc(SessionDoc $sessionDoc): self
  819.     {
  820.         if ($this->sessionDocs->removeElement($sessionDoc)) {
  821.             // set the owning side to null (unless already changed)
  822.             if ($sessionDoc->getSession() === $this) {
  823.                 $sessionDoc->setSession(null);
  824.             }
  825.         }
  826.         return $this;
  827.     }
  828.     public function getSessionCategory(): ?CommonCategory
  829.     {
  830.         return $this->sessionCategory;
  831.     }
  832.     public function setSessionCategory(?CommonCategory $sessionCategory): self
  833.     {
  834.         $this->sessionCategory $sessionCategory;
  835.         return $this;
  836.     }
  837.     public function getIsCommentEnable(): ?bool
  838.     {
  839.         return $this->isCommentEnable;
  840.     }
  841.     public function setIsCommentEnable(?bool $isCommentEnable): self
  842.     {
  843.         $this->isCommentEnable $isCommentEnable;
  844.         return $this;
  845.     }
  846.     public function getIsCommentModerated(): ?bool
  847.     {
  848.         return $this->isCommentModerated;
  849.     }
  850.     public function setIsCommentModerated(?bool $isCommentModerated): self
  851.     {
  852.         $this->isCommentModerated $isCommentModerated;
  853.         return $this;
  854.     }
  855.     public function getIsSharingEnable(): ?bool
  856.     {
  857.         return $this->isSharingEnable;
  858.     }
  859.     public function setIsSharingEnable(?bool $isSharingEnable): self
  860.     {
  861.         $this->isSharingEnable $isSharingEnable;
  862.         return $this;
  863.     }
  864.     public function getIsLikeEnable(): ?bool
  865.     {
  866.         return $this->isLikeEnable;
  867.     }
  868.     public function setIsLikeEnable(?bool $isLikeEnable): self
  869.     {
  870.         $this->isLikeEnable $isLikeEnable;
  871.         return $this;
  872.     }
  873.     public function getIsJoinRequired(): ?bool
  874.     {
  875.         return $this->isJoinRequired;
  876.     }
  877.     public function setIsJoinRequired(?bool $isJoinRequired): self
  878.     {
  879.         $this->isJoinRequired $isJoinRequired;
  880.         return $this;
  881.     }
  882.     public function getIsSessionPublic(): ?bool
  883.     {
  884.         return $this->isSessionPublic;
  885.     }
  886.     public function setIsSessionPublic(?bool $isSessionPublic): self
  887.     {
  888.         $this->isSessionPublic $isSessionPublic;
  889.         return $this;
  890.     }
  891.     public function getIsExternalLinkEnable(): ?bool
  892.     {
  893.         return $this->isExternalLinkEnable;
  894.     }
  895.     public function setIsExternalLinkEnable(?bool $isExternalLinkEnable): self
  896.     {
  897.         $this->isExternalLinkEnable $isExternalLinkEnable;
  898.         return $this;
  899.     }
  900.     public function getExternalLinkLabel(): ?string
  901.     {
  902.         return $this->externalLinkLabel;
  903.     }
  904.     public function setExternalLinkLabel(?string $externalLinkLabel): self
  905.     {
  906.         $this->externalLinkLabel $externalLinkLabel;
  907.         return $this;
  908.     }
  909.     public function getExternalLinkUrl(): ?string
  910.     {
  911.         return $this->externalLinkUrl;
  912.     }
  913.     public function setExternalLinkUrl(?string $externalLinkUrl): self
  914.     {
  915.         $this->externalLinkUrl $externalLinkUrl;
  916.         return $this;
  917.     }
  918.     public function getIsShowInVideoLibrary(): ?bool
  919.     {
  920.         return $this->isShowInVideoLibrary;
  921.     }
  922.     public function setIsShowInVideoLibrary(?bool $isShowInVideoLibrary): self
  923.     {
  924.         $this->isShowInVideoLibrary $isShowInVideoLibrary;
  925.         return $this;
  926.     }
  927.     public function getIsSessionAutoSwitch(): ?bool
  928.     {
  929.         return $this->isSessionAutoSwitch;
  930.     }
  931.     public function setIsSessionAutoSwitch(?bool $isSessionAutoSwitch): self
  932.     {
  933.         $this->isSessionAutoSwitch $isSessionAutoSwitch;
  934.         return $this;
  935.     }
  936.     /**
  937.      * @return Collection|User[]
  938.      */
  939.     public function getSpeakers(): Collection
  940.     {
  941.         return $this->speakers;
  942.     }
  943.     public function addSpeaker(User $speaker): self
  944.     {
  945.         if (!$this->speakers->contains($speaker)) {
  946.             $this->speakers[] = $speaker;
  947.         }
  948.         return $this;
  949.     }
  950.     public function removeSpeaker(User $speaker): self
  951.     {
  952.         $this->speakers->removeElement($speaker);
  953.         return $this;
  954.     }
  955.     public function removeAllSpeakers(): self
  956.     {
  957.         foreach ($this->speakers as $speaker) {
  958.             $this->speakers->removeElement($speaker);
  959.         }
  960.         return $this;
  961.     }
  962.     public function getSpeakersName(): Collection
  963.     {
  964.         $names = [];
  965.         foreach ($this->speakers as $speaker) {
  966.             $names[] = $speaker;
  967.         }
  968.         return $names;
  969.     }
  970.     /**
  971.      * @return Collection|User[]
  972.      */
  973.     public function getModerators(): Collection
  974.     {
  975.         return $this->moderators;
  976.     }
  977.     public function addModerator(User $moderator): self
  978.     {
  979.         if (!$this->moderators->contains($moderator)) {
  980.             $this->moderators[] = $moderator;
  981.         }
  982.         return $this;
  983.     }
  984.     public function removeModerator(User $moderator): self
  985.     {
  986.         $this->moderators->removeElement($moderator);
  987.         return $this;
  988.     }
  989.     public function removeAllModerators(): self
  990.     {
  991.         foreach ($this->moderators as $moderator) {
  992.             $this->moderators->removeElement($moderator);
  993.         }
  994.         return $this;
  995.     }
  996.     public function getModeratorsName(): Collection
  997.     {
  998.         $names = [];
  999.         foreach ($this->moderators as $moderator) {
  1000.             $names[] = $moderator;
  1001.         }
  1002.         return $names;
  1003.     }
  1004.     public function getStreamType(): ?string
  1005.     {
  1006.         return $this->streamType;
  1007.     }
  1008.     public function setStreamType(?string $streamType): self
  1009.     {
  1010.         $this->streamType $streamType;
  1011.         return $this;
  1012.     }
  1013.     public function getZoomUrl(): ?string
  1014.     {
  1015.         return $this->zoomUrl;
  1016.     }
  1017.     public function setZoomUrl(?string $zoomUrl): self
  1018.     {
  1019.         $this->zoomUrl $zoomUrl;
  1020.         return $this;
  1021.     }
  1022.     public function getZoomMeetingNumber(): ?string
  1023.     {
  1024.         return $this->zoomMeetingNumber;
  1025.     }
  1026.     public function setZoomMeetingNumber(?string $zoomMeetingNumber): self
  1027.     {
  1028.         $this->zoomMeetingNumber $zoomMeetingNumber;
  1029.         return $this;
  1030.     }
  1031.     public function getZoomMeetingPassword(): ?string
  1032.     {
  1033.         return $this->zoomMeetingPassword;
  1034.     }
  1035.     public function setZoomMeetingPassword(?string $zoomMeetingPassword): self
  1036.     {
  1037.         $this->zoomMeetingPassword $zoomMeetingPassword;
  1038.         return $this;
  1039.     }
  1040.     public function getWebexUrl(): ?string
  1041.     {
  1042.         return $this->webexUrl;
  1043.     }
  1044.     public function setWebexUrl(?string $webexUrl): self
  1045.     {
  1046.         $this->webexUrl $webexUrl;
  1047.         return $this;
  1048.     }
  1049.     public function getWebexMeetingPassword(): ?string
  1050.     {
  1051.         return $this->webexMeetingPassword;
  1052.     }
  1053.     public function setWebexMeetingPassword(?string $webexMeetingPassword): self
  1054.     {
  1055.         $this->webexMeetingPassword $webexMeetingPassword;
  1056.         return $this;
  1057.     }
  1058.     public function getCardSize(): ?string
  1059.     {
  1060.         return $this->cardSize;
  1061.     }
  1062.     public function setCardSize(?string $cardSize): self
  1063.     {
  1064.         $this->cardSize $cardSize;
  1065.         return $this;
  1066.     }
  1067.     public function getCardType(): ?string
  1068.     {
  1069.         return $this->cardType;
  1070.     }
  1071.     public function setCardType(?string $cardType): self
  1072.     {
  1073.         $this->cardType $cardType;
  1074.         return $this;
  1075.     }
  1076.     public function getOrd(): ?int
  1077.     {
  1078.         return $this->ord;
  1079.     }
  1080.     public function setOrd(?int $ord): self
  1081.     {
  1082.         $this->ord $ord;
  1083.         return $this;
  1084.     }
  1085.     public function getIds()
  1086.     {
  1087.         return $this->ids;
  1088.     }
  1089.     public function setIds($ids)
  1090.     {
  1091.         $this->ids $ids;
  1092.         return $this;
  1093.     }
  1094.     /**
  1095.      * @return Collection|UserGroup[]
  1096.      */
  1097.     public function getUserGroups(): Collection
  1098.     {
  1099.         return $this->userGroups;
  1100.     }
  1101.     /**
  1102.      * @Groups({"Session:EL"})
  1103.      * @SerializedName("groups")
  1104.      */
  1105.     public function getUserGroupsArray()
  1106.     {
  1107.         $groups = [];
  1108.         foreach ($this->userGroups as $group) {
  1109.             if (!$group->getIsGenerated()) {
  1110.                 $groups[] = $group->getId();
  1111.             }
  1112.         }
  1113.         return $groups;
  1114.     }
  1115.     public function addUserGroup(UserGroup $userGroup): self
  1116.     {
  1117.         if (!$this->userGroups->contains($userGroup)) {
  1118.             $this->userGroups[] = $userGroup;
  1119.         }
  1120.         return $this;
  1121.     }
  1122.     public function setUserGroups($userGroups): self
  1123.     {
  1124.         $this->userGroups $userGroups;
  1125.         return $this;
  1126.     }
  1127.     public function removeUserGroup(UserGroup $userGroup): self
  1128.     {
  1129.         $this->userGroups->removeElement($userGroup);
  1130.         return $this;
  1131.     }
  1132.     public function removeAllUserGroups(): self
  1133.     {
  1134.         foreach ($this->userGroups as $userGroup) {
  1135.             $this->removeUserGroup($userGroup);
  1136.         }
  1137.         return $this;
  1138.     }
  1139.     public function getIsReply(): ?bool
  1140.     {
  1141.         return $this->isReply;
  1142.     }
  1143.     public function setIsReply(?bool $isReply): self
  1144.     {
  1145.         $this->isReply $isReply;
  1146.         return $this;
  1147.     }
  1148.     public function getIsLive(): ?bool
  1149.     {
  1150.         /*
  1151.         if (
  1152.             $this->getStart() && $this->getCurrentTime() >= $this->getStart()
  1153.             && $this->getEnd() && $this->getCurrentTime() < $this->getEnd()
  1154.         ) {
  1155.             return true;
  1156.         }
  1157.         return false;
  1158.         */
  1159.         return $this->isLive;
  1160.     }
  1161.     public function setIsLive(?bool $isLive): self
  1162.     {
  1163.         $this->isLive $isLive;
  1164.         return $this;
  1165.     }
  1166.     /**
  1167.      * @Groups({"Session:Read", "Session:GetItemDetail", "ElTask:Read"})
  1168.      */
  1169.     public function getCurrentTime()
  1170.     {
  1171.         return new \DateTime();
  1172.     }
  1173.     /**
  1174.      * @Groups({"Session:Read", "Session:GetItemDetail"})
  1175.      */
  1176.     public function getZoomSignature(): ?string
  1177.     {
  1178.         if (!$this->container) {
  1179.             return false;
  1180.         }
  1181.         $isZoomEnable $this->container->getConfiguration('isZoomEnable');
  1182.         $zoomKey $this->container->getConfiguration('zoomKey');
  1183.         $zoomSecret $this->container->getConfiguration('zoomSecret');
  1184.         if ($isZoomEnable && $zoomKey && $zoomSecret && $this->zoomMeetingNumber) {
  1185.             return $this->generateZoomSDKSignature($zoomKey$zoomSecret$this->zoomMeetingNumber);
  1186.         }
  1187.         return false;
  1188.     }
  1189.     private function generateZoomSignature($apiKey$apiSecret$meetingNumber$role 0)
  1190.     {
  1191.         $time time() * 1000 30000;
  1192.         $data base64_encode($apiKey $meetingNumber $time $role);
  1193.         $hash hash_hmac('sha256'$data$apiSecrettrue);
  1194.         $signature $apiKey "." $meetingNumber "." $time "." $role "." base64_encode($hash);
  1195.         return rtrim(strtr(base64_encode($signature), '+/''-_'), '=');
  1196.     }
  1197.     private function generateZoomSDKSignature($apiKey$apiSecret$meetingNumber$role 0)
  1198.     {
  1199.         $iat time() - 30;
  1200.         $exp $iat 60 60 2;
  1201.         $payload = [
  1202.             'sdkKey' => $apiKey,
  1203.             'mn' => $meetingNumber,
  1204.             'role' => $role,
  1205.             'iat' => $iat,
  1206.             'exp' => $exp,
  1207.             'tokenExp' => $exp
  1208.         ];
  1209.         return JWT::encode($payload$apiSecret'HS256');
  1210.     }
  1211.     /**
  1212.      * @return Collection|SessionQuestion[]
  1213.      */
  1214.     public function getSessionQuestions(): Collection
  1215.     {
  1216.         return $this->sessionQuestions;
  1217.     }
  1218.     public function addSessionQuestion(SessionQuestion $sessionQuestion): self
  1219.     {
  1220.         if (!$this->sessionQuestions->contains($sessionQuestion)) {
  1221.             $this->sessionQuestions[] = $sessionQuestion;
  1222.             $sessionQuestion->setSession($this);
  1223.         }
  1224.         return $this;
  1225.     }
  1226.     public function removeSessionQuestion(SessionQuestion $sessionQuestion): self
  1227.     {
  1228.         if ($this->sessionQuestions->removeElement($sessionQuestion)) {
  1229.             // set the owning side to null (unless already changed)
  1230.             if ($sessionQuestion->getSession() === $this) {
  1231.                 $sessionQuestion->setSession(null);
  1232.             }
  1233.         }
  1234.         return $this;
  1235.     }
  1236.     public function getIsQuestionEnable(): ?bool
  1237.     {
  1238.         return $this->isQuestionEnable;
  1239.     }
  1240.     public function setIsQuestionEnable(?bool $isQuestionEnable): self
  1241.     {
  1242.         $this->isQuestionEnable $isQuestionEnable;
  1243.         return $this;
  1244.     }
  1245.     public function getIsAnswerEnable(): ?bool
  1246.     {
  1247.         return $this->isAnswerEnable;
  1248.     }
  1249.     public function setIsAnswerEnable(?bool $isAnswerEnable): self
  1250.     {
  1251.         $this->isAnswerEnable $isAnswerEnable;
  1252.         return $this;
  1253.     }
  1254.     public function getIsQuestionModerated(): ?bool
  1255.     {
  1256.         return $this->isQuestionModerated;
  1257.     }
  1258.     public function setIsQuestionModerated(?bool $isQuestionModerated): self
  1259.     {
  1260.         $this->isQuestionModerated $isQuestionModerated;
  1261.         return $this;
  1262.     }
  1263.     public function getIsAskSpeakerEnable(): ?bool
  1264.     {
  1265.         return $this->isAskSpeakerEnable;
  1266.     }
  1267.     public function setIsAskSpeakerEnable(?bool $isAskSpeakerEnable): self
  1268.     {
  1269.         $this->isAskSpeakerEnable $isAskSpeakerEnable;
  1270.         return $this;
  1271.     }
  1272.     public function getIsAskSpeakerPublicEnable(): ?bool
  1273.     {
  1274.         return $this->isAskSpeakerPublicEnable;
  1275.     }
  1276.     public function setIsAskSpeakerPublicEnable(?bool $isAskSpeakerPublicEnable): self
  1277.     {
  1278.         $this->isAskSpeakerPublicEnable $isAskSpeakerPublicEnable;
  1279.         return $this;
  1280.     }
  1281.     /**
  1282.      * @return Collection|WatchTime[]
  1283.      */
  1284.     public function getWatchTimes(): Collection
  1285.     {
  1286.         return $this->watchTimes;
  1287.     }
  1288.     public function addWatchTime(WatchTime $watchTime): self
  1289.     {
  1290.         if (!$this->watchTimes->contains($watchTime)) {
  1291.             $this->watchTimes[] = $watchTime;
  1292.             $watchTime->setSession($this);
  1293.         }
  1294.         return $this;
  1295.     }
  1296.     public function removeWatchTime(WatchTime $watchTime): self
  1297.     {
  1298.         if ($this->watchTimes->removeElement($watchTime)) {
  1299.             // set the owning side to null (unless already changed)
  1300.             if ($watchTime->getSession() === $this) {
  1301.                 $watchTime->setSession(null);
  1302.             }
  1303.         }
  1304.         return $this;
  1305.     }
  1306.     public function getIsSendReminder(): ?bool
  1307.     {
  1308.         return $this->isSendReminder;
  1309.     }
  1310.     public function setIsSendReminder(?bool $isSendReminder): self
  1311.     {
  1312.         $this->isSendReminder $isSendReminder;
  1313.         return $this;
  1314.     }
  1315.     /**
  1316.      * @return Collection|CommonComment[]
  1317.      */
  1318.     public function getCommonComments(): Collection
  1319.     {
  1320.         return $this->commonComments;
  1321.     }
  1322.     public function addCommonComment(CommonComment $commonComment): self
  1323.     {
  1324.         if (!$this->commonComments->contains($commonComment)) {
  1325.             $this->commonComments[] = $commonComment;
  1326.             $commonComment->setSession($this);
  1327.         }
  1328.         return $this;
  1329.     }
  1330.     public function removeCommonComment(CommonComment $commonComment): self
  1331.     {
  1332.         if ($this->commonComments->removeElement($commonComment)) {
  1333.             // set the owning side to null (unless already changed)
  1334.             if ($commonComment->getSession() === $this) {
  1335.                 $commonComment->setSession(null);
  1336.             }
  1337.         }
  1338.         return $this;
  1339.     }
  1340.     public function getIsPostEnable()
  1341.     {
  1342.         return true;
  1343.     }
  1344.     public function getPostText()
  1345.     {
  1346.         $postText = [];
  1347.         foreach ($this->getTranslations() as $translation) {
  1348.             $postText[] = $translation->getTitle();
  1349.         }
  1350.         return implode('###'$postText);
  1351.     }
  1352.     public function getPostPoster()
  1353.     {
  1354.         return $this->getImageName();
  1355.     }
  1356.     public function getMetadataTranslation()
  1357.     {
  1358.         $translations = [];
  1359.         foreach ($this->getTranslations() as $translation) {
  1360.             $translations[] = [
  1361.                 $translation->getLocale() => [
  1362.                     'title' => $translation->getTitle(),
  1363.                     'description' => $translation->getDescription(),
  1364.                     'streamUrl' => $translation->getStreamUrl()
  1365.                 ]
  1366.             ];
  1367.         }
  1368.         return $translations;
  1369.     }
  1370.     public function getPostMetadata()
  1371.     {
  1372.         return [
  1373.             'session' => [
  1374.                 'id' => $this->getId(),
  1375.                 'translations' => $this->getMetadataTranslation(),
  1376.                 'tags' => $this->getTagsArray(),
  1377.                 'sessionCategory' => $this->getSessionCategory() ? $this->getSessionCategory()->getMeta() : null,
  1378.                 'start' => EsUtil::convertToUTCTime($this->getStart())->format('Y-m-d H:i:s')
  1379.             ],
  1380.             'conference' => [
  1381.                 'id' => $this->getConference()->getId(),
  1382.                 'translations' => $this->getConference()->getMetadataTranslation()
  1383.             ]
  1384.         ];
  1385.     }
  1386.     public function getPostUserGroups()
  1387.     {
  1388.         return $this->getUserGroups();
  1389.     }
  1390.     public function getPostSource()
  1391.     {
  1392.         return CommonComment::SOURCE_SESSION;
  1393.     }
  1394.     public function getPostSubSource()
  1395.     {
  1396.         return Newsfeed::POSTSUBTYPE_SESSION;
  1397.     }
  1398.     public function getMeta(): ?array
  1399.     {
  1400.         return $this->meta;
  1401.     }
  1402.     public function setMeta(?array $meta): self
  1403.     {
  1404.         $this->meta $meta;
  1405.         return $this;
  1406.     }
  1407.     public function getSelfMeta()
  1408.     {
  1409.         $selfMeta = [
  1410.             'speakers' => [],
  1411.             'moderators' => []
  1412.         ];
  1413.         foreach ($this->getSpeakers() as $speaker) {
  1414.             $selfMeta['speakers'][] = $speaker->getMetadata();
  1415.         }
  1416.         foreach ($this->getModerators() as $moderator) {
  1417.             $selfMeta['moderators'][] = $moderator->getMetadata();
  1418.         }
  1419.         return $selfMeta;
  1420.     }
  1421.     public function getVideoGalleryTranslations()
  1422.     {
  1423.         $translations = [];
  1424.         foreach ($this->getTranslations() as $translation) {
  1425.             $translations[] = new VideoGalleryTranslation($translation->getLocale(), $translation->getTitle(), $translation->getDescription());
  1426.         }
  1427.         return $translations;
  1428.     }
  1429.     public function getVideoGalleryType()
  1430.     {
  1431.         return VideoGallery::VIDEOGALLERYTYPE_SESSION;
  1432.     }
  1433.     public function getVideoGalleryTypeId()
  1434.     {
  1435.         return $this->getId();
  1436.     }
  1437.     public function getVideoGalleryStreamType()
  1438.     {
  1439.         return $this->getStreamType();
  1440.     }
  1441.     public function getVideoGalleryMetadata()
  1442.     {
  1443.         $translations = [];
  1444.         foreach ($this->getTranslations() as $translation) {
  1445.             $translations[] = [
  1446.                 $translation->getLocale() => [
  1447.                     'streamUrl' => $translation->getStreamUrl()
  1448.                 ]
  1449.             ];
  1450.         }
  1451.         $totalChapters $this->getSessionChapters()?->count();
  1452.         return [
  1453.             'session' => [
  1454.                 'id' => $this->getId(),
  1455.                 'translations' => $translations,
  1456.                 'streamType' => $this->getStreamType(),
  1457.                 'zoomUrl' => $this->getZoomUrl(),
  1458.                 'zoomMeetingNumber' => $this->getZoomMeetingNumber(),
  1459.                 'zoomMeetingPassword' => $this->getZoomMeetingPassword(),
  1460.                 'webexUrl' => $this->getWebexUrl(),
  1461.                 'webexMeetingPassword' => $this->getWebexMeetingPassword(),
  1462.                 'imageName' => $this->getImageName(),
  1463.                 'hasChapter' => $totalChapters true false
  1464.             ],
  1465.             'conference' => [
  1466.                 'id' => $this->getConference()->getId(),
  1467.                 'translations' => $this->getConference()->getMetadataTranslation()
  1468.             ]
  1469.         ];
  1470.     }
  1471.     public function getVideoGallerySpeakers()
  1472.     {
  1473.         return $this->getSpeakers();
  1474.     }
  1475.     public function getVideoGalleryModerators()
  1476.     {
  1477.         return $this->getModerators();
  1478.     }
  1479.     public function getVideoGalleryTags()
  1480.     {
  1481.         return $this->getSessionTags();
  1482.     }
  1483.     public function getVideoGalleryUserGroups()
  1484.     {
  1485.         return $this->getUserGroups();
  1486.     }
  1487.     public function getVideoGalleryChapters()
  1488.     {
  1489.         return $this->getSessionChapters();
  1490.     }
  1491.     public function getVideoGalleryDocs()
  1492.     {
  1493.         return $this->getSessionDocs();
  1494.     }
  1495.     public function getVideoGalleryCommentEnable()
  1496.     {
  1497.         return $this->getIsCommentEnable();
  1498.     }
  1499.     public function getClone(Session $source null): self
  1500.     {
  1501.         if (empty($source)) {
  1502.             $source $this;
  1503.         }
  1504.         $target = new Session();
  1505.         $target
  1506.             ->setStart($source->getStart())
  1507.             ->setEnd($source->getEnd())
  1508.             ->setImageName($source->getImageName())
  1509.             ->setStreamType($source->getStreamType())
  1510.             ->setIsVisible($source->getIsVisible())
  1511.             ->setIsCommentEnable($source->getIsCommentEnable())
  1512.             ->setIsCommentModerated($source->getIsCommentModerated())
  1513.             ->setIsSharingEnable($source->getIsSharingEnable())
  1514.             ->setIsLikeEnable($source->getIsLikeEnable())
  1515.             ->setIsJoinRequired($source->getIsJoinRequired())
  1516.             ->setIsSessionPublic($source->getIsSessionPublic())
  1517.             ->setIsExternalLinkEnable($source->getIsExternalLinkEnable())
  1518.             ->setExternalLinkLabel($source->getExternalLinkLabel())
  1519.             ->setExternalLinkUrl($source->getExternalLinkUrl())
  1520.             ->setIsShowInVideoLibrary($source->getIsShowInVideoLibrary())
  1521.             ->setIsSessionAutoSwitch($source->getIsSessionAutoSwitch())
  1522.             ->setZoomUrl($source->getZoomUrl())
  1523.             ->setZoomMeetingNumber($source->getZoomMeetingNumber())
  1524.             ->setZoomMeetingPassword($source->getZoomMeetingPassword())
  1525.             ->setWebexUrl($source->getWebexUrl())
  1526.             ->setWebexMeetingPassword($source->getWebexMeetingPassword())
  1527.             ->setCardSize($source->getCardSize())
  1528.             ->setCardType($source->getCardType())
  1529.             ->setOrd($source->getOrd())
  1530.             ->setIsReply($source->getIsReply())
  1531.             ->setIsLive($source->getIsLive())
  1532.             ->setIsQuestionEnable($source->getIsQuestionEnable())
  1533.             ->setIsAnswerEnable($source->getIsAnswerEnable())
  1534.             ->setIsQuestionModerated($source->getIsQuestionModerated())
  1535.             ->setIsAskSpeakerEnable($source->getIsAskSpeakerEnable())
  1536.             ->setIsSendReminder($source->getIsSendReminder())
  1537.             ->setSessionCategory($source->getSessionCategory())
  1538.             ->setConference($source->getConference())
  1539.             ->setBulletPoints($source->getBulletPoints())
  1540.             ->setContainer($source->getContainer())
  1541.         ;
  1542.         foreach ($source->getTranslations() as $s) {
  1543.             $newT = new SessionTranslation();
  1544.             $newT
  1545.                 ->setTitle($s->getTitle())
  1546.                 ->setDescription($s->getDescription())
  1547.                 ->setStreamUrl($s->getStreamUrl())
  1548.                 ->setLocale($s->getLocale())
  1549.             ;
  1550.             $target->addTranslation($newT);
  1551.         }
  1552.         foreach ($source->getSpeakers() as $s) {
  1553.             $target->addSpeaker($s);
  1554.         }
  1555.         foreach ($source->getModerators() as $s) {
  1556.             $target->addModerator($s);
  1557.         }
  1558.         foreach ($source->getSessionTags() as $s) {
  1559.             $target->addSessionTag($s);
  1560.         }
  1561.         foreach ($source->getSessionDocs() as $s) {
  1562.             $target->addSessionDoc($s);
  1563.         }
  1564.         foreach ($source->getUserGroups() as $s) {
  1565.             $target->addUserGroup($s);
  1566.         }
  1567.         return $target;
  1568.     }
  1569.     public function getIsShowPublic(): ?bool
  1570.     {
  1571.         return $this->isShowPublic;
  1572.     }
  1573.     public function setIsShowPublic(?bool $isShowPublic): self
  1574.     {
  1575.         $this->isShowPublic $isShowPublic;
  1576.         return $this;
  1577.     }
  1578.     public function getTotalReactions(): ?int
  1579.     {
  1580.         return $this->totalReactions;
  1581.     }
  1582.     public function setTotalReactions(?int $totalReactions): self
  1583.     {
  1584.         $this->totalReactions $totalReactions;
  1585.         return $this;
  1586.     }
  1587.     public function getTotalReactionsByType(): ?array
  1588.     {
  1589.         return $this->totalReactionsByType;
  1590.     }
  1591.     public function setTotalReactionsByType(?array $totalReactionsByType): self
  1592.     {
  1593.         $this->totalReactionsByType $totalReactionsByType;
  1594.         return $this;
  1595.     }
  1596.     public function getIsSessionReactionEnable(): ?bool
  1597.     {
  1598.         return $this->isSessionReactionEnable;
  1599.     }
  1600.     public function setIsSessionReactionEnable(?bool $isSessionReactionEnable): self
  1601.     {
  1602.         $this->isSessionReactionEnable $isSessionReactionEnable;
  1603.         return $this;
  1604.     }
  1605.     public function getDelay()
  1606.     {
  1607.         return $this->delay;
  1608.     }
  1609.     public function setDelay($delay)
  1610.     {
  1611.         $this->delay $delay;
  1612.         return $this;
  1613.     }
  1614.     /**
  1615.      * @return Collection<int, SessionChapter>
  1616.      */
  1617.     public function getSessionChapters(): Collection
  1618.     {
  1619.         return $this->sessionChapters;
  1620.     }
  1621.     public function addSessionChapter(SessionChapter $sessionChapter): self
  1622.     {
  1623.         if (!$this->sessionChapters->contains($sessionChapter)) {
  1624.             $this->sessionChapters[] = $sessionChapter;
  1625.             $sessionChapter->setSession($this);
  1626.         }
  1627.         return $this;
  1628.     }
  1629.     public function removeSessionChapter(SessionChapter $sessionChapter): self
  1630.     {
  1631.         if ($this->sessionChapters->removeElement($sessionChapter)) {
  1632.             // set the owning side to null (unless already changed)
  1633.             if ($sessionChapter->getSession() === $this) {
  1634.                 $sessionChapter->setSession(null);
  1635.             }
  1636.         }
  1637.         return $this;
  1638.     }
  1639.     public function getBulletPoints(): ?array
  1640.     {
  1641.         if ($this->bulletPoints === null) {
  1642.             $this->bulletPoints = [];
  1643.         }
  1644.         return $this->bulletPoints;
  1645.     }
  1646.     public function setBulletPoints(?array $bulletPoints): self
  1647.     {
  1648.         if (!is_array($bulletPoints)) {
  1649.             return $this;
  1650.         }
  1651.         $this->bulletPoints $bulletPoints;
  1652.         return $this;
  1653.     }
  1654.     public function getVideoGallery(): ?VideoGallery
  1655.     {
  1656.         return $this->videoGallery;
  1657.     }
  1658.     public function setVideoGallery(?VideoGallery $videoGallery): self
  1659.     {
  1660.         $this->videoGallery $videoGallery;
  1661.         return $this;
  1662.     }
  1663.     public function getIsNotConsiderForCertificate(): ?bool
  1664.     {
  1665.         return $this->isNotConsiderForCertificate;
  1666.     }
  1667.     public function setIsNotConsiderForCertificate(?bool $isNotConsiderForCertificate): self
  1668.     {
  1669.         $this->isNotConsiderForCertificate $isNotConsiderForCertificate;
  1670.         return $this;
  1671.     }
  1672.     /**
  1673.      * @return Collection|VoteQuestion[]
  1674.      */
  1675.     public function getVoteQuestions(): Collection
  1676.     {
  1677.         return $this->voteQuestions;
  1678.     }
  1679.     public function addVoteQuestion(VoteQuestion $voteQuestion): self
  1680.     {
  1681.         if (!$this->voteQuestions->contains($voteQuestion)) {
  1682.             $this->voteQuestions[] = $voteQuestion;
  1683.             $voteQuestion->setSession($this);
  1684.         }
  1685.         return $this;
  1686.     }
  1687.     public function removeVoteQuestion(VoteQuestion $voteQuestion): self
  1688.     {
  1689.         if ($this->voteQuestions->removeElement($voteQuestion)) {
  1690.             // set the owning side to null (unless already changed)
  1691.             if ($voteQuestion->getSession() === $this) {
  1692.                 $voteQuestion->setSession(null);
  1693.             }
  1694.         }
  1695.         return $this;
  1696.     }
  1697.     public function getOldId(): ?int
  1698.     {
  1699.         return $this->oldId;
  1700.     }
  1701.     public function setOldId(?int $oldId): self
  1702.     {
  1703.         $this->oldId $oldId;
  1704.         return $this;
  1705.     }
  1706.     public function getShortCode(): ?string
  1707.     {
  1708.         return $this->shortCode;
  1709.     }
  1710.     public function setShortCode(?string $shortCode): self
  1711.     {
  1712.         $this->shortCode $shortCode;
  1713.         return $this;
  1714.     }
  1715.     /**
  1716.      * Get the value of currentId
  1717.      */
  1718.     public function getCurrentId()
  1719.     {
  1720.         return $this->currentId;
  1721.     }
  1722.     /**
  1723.      * Set the value of currentId
  1724.      *
  1725.      * @return  self
  1726.      */
  1727.     public function setCurrentId($currentId)
  1728.     {
  1729.         $this->currentId $currentId;
  1730.         return $this;
  1731.     }
  1732.     /**
  1733.      * Get the value of nextSession
  1734.      */
  1735.     public function getNextSession()
  1736.     {
  1737.         return $this->nextSession;
  1738.     }
  1739.     /**
  1740.      * Set the value of nextSession
  1741.      *
  1742.      * @return  self
  1743.      */
  1744.     public function setNextSession($nextSession)
  1745.     {
  1746.         $this->nextSession $nextSession;
  1747.         return $this;
  1748.     }
  1749.     public function getLastExtendAt(): ?\DateTimeInterface
  1750.     {
  1751.         return $this->lastExtendAt;
  1752.     }
  1753.     public function setLastExtendAt(?\DateTimeInterface $lastExtendAt): self
  1754.     {
  1755.         $this->lastExtendAt $lastExtendAt;
  1756.         return $this;
  1757.     }
  1758.     public function getIsLastOfTheDay(): ?bool
  1759.     {
  1760.         return $this->isLastOfTheDay;
  1761.     }
  1762.     public function setIsLastOfTheDay(?bool $isLastOfTheDay): self
  1763.     {
  1764.         $this->isLastOfTheDay $isLastOfTheDay;
  1765.         return $this;
  1766.     }
  1767.     /**
  1768.      * @Groups({"Session:EL"})
  1769.      */
  1770.     public function getCntId()
  1771.     {
  1772.         return $this->container->getId();
  1773.     }
  1774.     /**
  1775.      * @Groups({"Session:EL"})
  1776.      */
  1777.     public function getCategory()
  1778.     {
  1779.         return $this->getSessionCategory();
  1780.     }
  1781.     public function isIsOnsite(): ?bool
  1782.     {
  1783.         return $this->isOnsite;
  1784.     }
  1785.     public function setIsOnsite(?bool $isOnsite): self
  1786.     {
  1787.         $this->isOnsite $isOnsite;
  1788.         return $this;
  1789.     }
  1790. }