src/Products/NotificationsBundle/Entity/ContactAttempts/TwitterContactAttempt.php line 17

Open in your IDE?
  1. <?php
  2. namespace Products\NotificationsBundle\Entity\ContactAttempts;
  3. use App\Entity\System\SocialAccounts\TwitterSocialAccount;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Products\NotificationsBundle\Entity\AbstractContactAttempt;
  6. /**
  7.  * Class TwitterContactAttempt
  8.  * @package Products\NotificationsBundle\Entity\ContactAttepmts
  9.  *
  10.  * @ORM\Entity(
  11.  *     repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\ContactAttempts\TwitterContactAttemptRepository",
  12.  * )
  13.  */
  14. class TwitterContactAttempt extends AbstractServiceContactAttempt
  15. {
  16.     const DISCR 'twitter';
  17.     const STATUSES = [
  18.         ...self::PENDING_STATUSES,
  19.         ...self::SUCCESSFUL_STATUSES,
  20.         ...self::FAILED_STATUSES,
  21.     ];
  22.     const PENDING_STATUSES = [
  23.         ...AbstractContactAttempt::PENDING_STATUSES,
  24.     ];
  25.     const SUCCESSFUL_STATUSES = [
  26.         ...AbstractContactAttempt::SUCCESSFUL_STATUSES,
  27.     ];
  28.     const FAILED_STATUSES = [
  29.         ...AbstractContactAttempt::FAILED_STATUSES,
  30.     ];
  31.     /**
  32.      * @var TwitterSocialAccount|null
  33.      *
  34.      * @ORM\ManyToOne(
  35.      *     targetEntity = "App\Entity\System\SocialAccounts\TwitterSocialAccount",
  36.      * )
  37.      * @ORM\JoinColumn(
  38.      *     name = "twitterAccount",
  39.      *     referencedColumnName = "id",
  40.      *     nullable = true,
  41.      *     onDelete = "SET NULL",
  42.      * )
  43.      */
  44.     protected ?TwitterSocialAccount $twitterAccount null;
  45.     /**
  46.      * @return TwitterSocialAccount|null
  47.      */
  48.     public function getTwitterAccount(): ?TwitterSocialAccount
  49.     {
  50.         return $this->twitterAccount;
  51.     }
  52.     /**
  53.      * @param TwitterSocialAccount|null $twitterAccount
  54.      * @return $this
  55.      */
  56.     public function setTwitterAccount(?TwitterSocialAccount $twitterAccount): self
  57.     {
  58.         $this->twitterAccount $twitterAccount;
  59.         return $this;
  60.     }
  61. }