Completed
Pull Request — master (#526)
by Paul
06:04
created

PageSeoTranslation::getFbAdmins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Victoire\Bundle\SeoBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
7
use Symfony\Component\Validator\Constraints as Assert;
8
use Victoire\Bundle\CoreBundle\Entity\Link;
9
use Victoire\Bundle\CoreBundle\Entity\View;
10
use Victoire\Bundle\PageBundle\Entity\BasePage;
11
12
/**
13
 * PageSeo Translation.
14
 *
15
 * @ORM\Table("vic_page_seo_translations")
16
 * @ORM\Entity()
17
 */
18
class PageSeoTranslation
19
{
20
    use Translation;
21
22
    /**
23
     * @var string
24
     *
25
     * @ORM\Column(name="meta_title", type="string", nullable=true)
26
     * @Assert\Length(max = 60)
27
     */
28
    protected $metaTitle;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(name="meta_description", type="string", length=255, nullable=true)
34
     * @Assert\Length(max = 155)
35
     */
36
    protected $metaDescription;
37
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="rel_author", type="string", length=255, nullable=true)
42
     */
43
    protected $relAuthor;
44
45
    /**
46
     * @var string
47
     *
48
     * @ORM\Column(name="rel_publisher", type="string", length=255, nullable=true)
49
     */
50
    protected $relPublisher;
51
52
    /**
53
     * @var string
54
     *
55
     * @ORM\Column(name="ogTitle", type="string", length=255, nullable=true)
56
     */
57
    protected $ogTitle;
58
59
    /**
60
     * @var string
61
     *
62
     * @ORM\Column(name="ogType", type="string", length=255, nullable=true)
63
     */
64
    protected $ogType;
65
66
    /**
67
     * @var string
68
     *
69
     * @ORM\ManyToOne(targetEntity="\Victoire\Bundle\MediaBundle\Entity\Media")
70
     * @ORM\JoinColumn(name="ogImage_id", referencedColumnName="id", onDelete="SET NULL")
71
     */
72
    protected $ogImage;
73
74
    /**
75
     * @var string
76
     *
77
     * @ORM\Column(name="ogUrl", type="string", length=255, nullable=true)
78
     */
79
    protected $ogUrl;
80
81
    /**
82
     * @var text
83
     *
84
     * @ORM\Column(name="ogDescription", type="text", nullable=true)
85
     */
86
    protected $ogDescription;
87
88
    /**
89
     * @var string
90
     *
91
     * @ORM\Column(name="fbAdmins", type="string", length=255, nullable=true)
92
     */
93
    protected $fbAdmins;
94
95
    /**
96
     * @var string
97
     *
98
     * @ORM\Column(name="twitterCard", type="string", length=255, nullable=true)
99
     */
100
    protected $twitterCard = 'summary';
101
102
    /**
103
     * @var string
104
     *
105
     * @ORM\Column(name="twitterUrl", type="string", length=255, nullable=true)
106
     * @Assert\Length(max = 15)
107
     */
108
    protected $twitterUrl;
109
110
    /**
111
     * @var string
112
     *
113
     * @ORM\Column(name="twitterCreator", type="string", length=255, nullable=true)
114
     * @Assert\Length(max = 15)
115
     */
116
    protected $twitterCreator;
117
118
    /**
119
     * @var string
120
     *
121
     * @ORM\Column(name="twitterTitle", type="string", length=255, nullable=true)
122
     * @Assert\Length(max = 70)
123
     */
124
    protected $twitterTitle;
125
126
    /**
127
     * @var string
128
     *
129
     * @ORM\Column(name="twitterDescription", type="string", length=255, nullable=true)
130
     * @Assert\Length(max = 200)
131
     */
132
    protected $twitterDescription;
133
134
    /**
135
     * @var string
136
     *
137
     * @ORM\ManyToOne(targetEntity="\Victoire\Bundle\MediaBundle\Entity\Media")
138
     * @ORM\JoinColumn(name="twitterImage_id", referencedColumnName="id", onDelete="SET NULL")
139
     */
140
    protected $twitterImage;
141
142
    /**
143
     * @var string
144
     *
145
     * @ORM\Column(name="schemaPageType", type="string", length=255, nullable=true)
146
     */
147
    protected $schemaPageType;
148
149
    /**
150
     * @var string
151
     *
152
     * @ORM\Column(name="schemaName", type="string", length=255, nullable=true)
153
     */
154
    protected $schemaName;
155
156
    /**
157
     * @var string
158
     *
159
     * @ORM\Column(name="schemaDescription", type="string", length=255, nullable=true)
160
     */
161
    protected $schemaDescription;
162
163
    /**
164
     * @var string
165
     *
166
     * @ORM\ManyToOne(targetEntity="\Victoire\Bundle\MediaBundle\Entity\Media")
167
     * @ORM\JoinColumn(name="schemaImage_id", referencedColumnName="id", onDelete="SET NULL")
168
     */
169
    protected $schemaImage;
170
171
    /**
172
     * @var string
173
     *
174
     * @ORM\Column(name="meta_robots_index", type="string", length=255, nullable=true)
175
     */
176
    protected $metaRobotsIndex;
177
178
    /**
179
     * @var string
180
     *
181
     * @ORM\Column(name="meta_robots_follow", type="string", length=255, nullable=true)
182
     */
183
    protected $metaRobotsFollow;
184
185
    /**
186
     * @var string
187
     *
188
     * @ORM\Column(name="meta_robots_advanced", type="string", length=255, nullable=true)
189
     */
190
    protected $metaRobotsAdvanced;
191
192
    /**
193
     * @var bool
194
     *
195
     * @ORM\Column(name="sitemap_indexed", type="boolean", nullable=true, options={"default" = true})
196
     */
197
    protected $sitemapIndexed = true;
198
199
    /**
200
     * @var float
201
     *
202
     * @ORM\Column(name="sitemap_priority", type="float", nullable=true, options={"default" = "0.8"})
203
     */
204
    protected $sitemapPriority = 0.8;
205
206
    /**
207
     * @var string
208
     *
209
     * @ORM\Column(name="sitemap_changeFreq", type="string", length=20, nullable=true, options={"default" = "monthly"})
210
     */
211
    protected $sitemapChangeFreq = 'monthly';
212
213
    /**
214
     * @var string
215
     *
216
     * @ORM\Column(name="rel_canonical", type="string", length=255, nullable=true)
217
     */
218
    protected $relCanonical;
219
220
    /**
221
     * @var string
222
     *
223
     * @ORM\Column(name="keyword", type="string", length=255, nullable=true)
224
     */
225
    protected $keyword;
226
227
    /**
228
     * @var string
229
     *
230
     * @ORM\ManyToOne(targetEntity="Victoire\Bundle\CoreBundle\Entity\Link", inversedBy="referers", cascade={"persist"})
231
     * @ORM\JoinColumn(name="redirect_to", referencedColumnName="id", onDelete="SET NULL")
232
     */
233
    protected $redirectTo;
234
235
    /**
236
     * Get id.
237
     *
238
     * @return int
239
     */
240
    public function getId()
241
    {
242
        return $this->id;
243
    }
244
245
    /**
246
     * Set redirectTo.
247
     *
248
     * @param View $redirectTo
249
     *
250
     * @return PageSeo
251
     */
252
    public function setRedirectTo(Link $redirectTo)
253
    {
254
        $this->redirectTo = $redirectTo;
0 ignored issues
show
Documentation Bug introduced by
It seems like $redirectTo of type object<Victoire\Bundle\CoreBundle\Entity\Link> is incompatible with the declared type string of property $redirectTo.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
255
256
        return $this;
257
    }
258
259
    /**
260
     * Get redirectTo.
261
     *
262
     * @return string
263
     */
264
    public function getRedirectTo()
265
    {
266
        return $this->redirectTo;
267
    }
268
269
    /**
270
     * Set metaTitle.
271
     *
272
     * @param string $metaTitle
273
     *
274
     * @return PageSeo
275
     */
276
    public function setMetaTitle($metaTitle)
277
    {
278
        $this->metaTitle = $metaTitle;
279
280
        return $this;
281
    }
282
283
    /**
284
     * Get metaTitle.
285
     *
286
     * @return string
287
     */
288
    public function getMetaTitle()
289
    {
290
        return $this->metaTitle;
291
    }
292
293
    /**
294
     * Set metaDescription.
295
     *
296
     * @param string $metaDescription
297
     *
298
     * @return PageSeo
299
     */
300
    public function setMetaDescription($metaDescription)
301
    {
302
        $this->metaDescription = $metaDescription;
303
304
        return $this;
305
    }
306
307
    /**
308
     * Get metaDescription.
309
     *
310
     * @return string
311
     */
312
    public function getMetaDescription()
313
    {
314
        return $this->metaDescription;
315
    }
316
317
    /**
318
     * Set relAuthor.
319
     *
320
     * @param string $relAuthor
321
     *
322
     * @return PageSeo
323
     */
324
    public function setRelAuthor($relAuthor)
325
    {
326
        $this->relAuthor = $relAuthor;
327
328
        return $this;
329
    }
330
331
    /**
332
     * Get relAuthor.
333
     *
334
     * @return string
335
     */
336
    public function getRelAuthor()
337
    {
338
        return $this->relAuthor;
339
    }
340
341
    /**
342
     * Set relPublisher.
343
     *
344
     * @param string $relPublisher
345
     *
346
     * @return PageSeo
347
     */
348
    public function setRelPublisher($relPublisher)
349
    {
350
        $this->relPublisher = $relPublisher;
351
352
        return $this;
353
    }
354
355
    /**
356
     * Get relPublisher.
357
     *
358
     * @return string
359
     */
360
    public function getRelPublisher()
361
    {
362
        return $this->relPublisher;
363
    }
364
365
    /**
366
     * Set ogTitle.
367
     *
368
     * @param string $ogTitle
369
     *
370
     * @return PageSeo
371
     */
372
    public function setOgTitle($ogTitle)
373
    {
374
        $this->ogTitle = $ogTitle;
375
376
        return $this;
377
    }
378
379
    /**
380
     * Get ogTitle.
381
     *
382
     * @return string
383
     */
384
    public function getOgTitle()
385
    {
386
        return $this->ogTitle;
387
    }
388
389
    /**
390
     * Set ogType.
391
     *
392
     * @param string $ogType
393
     *
394
     * @return PageSeo
395
     */
396
    public function setOgType($ogType)
397
    {
398
        $this->ogType = $ogType;
399
400
        return $this;
401
    }
402
403
    /**
404
     * Get ogType.
405
     *
406
     * @return string
407
     */
408
    public function getOgType()
409
    {
410
        return $this->ogType;
411
    }
412
413
    /**
414
     * Set ogImage.
415
     *
416
     * @param Image $ogImage
417
     *
418
     * @return PageSeo
419
     */
420
    public function setOgImage($ogImage)
421
    {
422
        $this->ogImage = $ogImage;
0 ignored issues
show
Documentation Bug introduced by
It seems like $ogImage of type object<Victoire\Bundle\SeoBundle\Entity\Image> is incompatible with the declared type string of property $ogImage.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
423
424
        return $this;
425
    }
426
427
    /**
428
     * Get ogImage.
429
     *
430
     * @return string
431
     */
432
    public function getOgImage()
433
    {
434
        return $this->ogImage;
435
    }
436
437
    /**
438
     * Set ogUrl.
439
     *
440
     * @param string $ogUrl
441
     *
442
     * @return PageSeo
443
     */
444
    public function setOgUrl($ogUrl)
445
    {
446
        $this->ogUrl = $ogUrl;
447
448
        return $this;
449
    }
450
451
    /**
452
     * Get ogUrl.
453
     *
454
     * @return string
455
     */
456
    public function getOgUrl()
457
    {
458
        return $this->ogUrl;
459
    }
460
461
    /**
462
     * Set ogDescription.
463
     *
464
     * @param string $ogDescription
465
     *
466
     * @return PageSeo
467
     */
468
    public function setOgDescription($ogDescription)
469
    {
470
        $this->ogDescription = $ogDescription;
0 ignored issues
show
Documentation Bug introduced by
It seems like $ogDescription of type string is incompatible with the declared type object<Victoire\Bundle\SeoBundle\Entity\text> of property $ogDescription.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
471
472
        return $this;
473
    }
474
475
    /**
476
     * Get ogDescription.
477
     *
478
     * @return string
479
     */
480
    public function getOgDescription()
481
    {
482
        return $this->ogDescription;
483
    }
484
485
    /**
486
     * Set fbAdmins.
487
     *
488
     * @param string $fbAdmins
489
     *
490
     * @return PageSeo
491
     */
492
    public function setFbAdmins($fbAdmins)
493
    {
494
        $this->fbAdmins = $fbAdmins;
495
496
        return $this;
497
    }
498
499
    /**
500
     * Get fbAdmins.
501
     *
502
     * @return string
503
     */
504
    public function getFbAdmins()
505
    {
506
        return $this->fbAdmins;
507
    }
508
509
    /**
510
     * Set twitterCard.
511
     *
512
     * @param string $twitterCard
513
     *
514
     * @return PageSeo
515
     */
516
    public function setTwitterCard($twitterCard)
517
    {
518
        $this->twitterCard = $twitterCard;
519
520
        return $this;
521
    }
522
523
    /**
524
     * Get twitterCard.
525
     *
526
     * @return string
527
     */
528
    public function getTwitterCard()
529
    {
530
        return $this->twitterCard;
531
    }
532
533
    /**
534
     * Set twitterUrl.
535
     *
536
     * @param string $twitterUrl
537
     *
538
     * @return PageSeo
539
     */
540
    public function setTwitterUrl($twitterUrl)
541
    {
542
        $this->twitterUrl = $twitterUrl;
543
544
        return $this;
545
    }
546
547
    /**
548
     * Get twitterUrl.
549
     *
550
     * @return string
551
     */
552
    public function getTwitterUrl()
553
    {
554
        return $this->twitterUrl;
555
    }
556
557
    /**
558
     * Set twitterCreator.
559
     *
560
     * @param string $twitterCreator
561
     *
562
     * @return PageSeo
563
     */
564
    public function setTwitterCreator($twitterCreator)
565
    {
566
        $this->twitterCreator = $twitterCreator;
567
568
        return $this;
569
    }
570
571
    /**
572
     * Get twitterCreator.
573
     *
574
     * @return string
575
     */
576
    public function getTwitterCreator()
577
    {
578
        return $this->twitterCreator;
579
    }
580
581
    /**
582
     * Set twitterTitle.
583
     *
584
     * @param string $twitterTitle
585
     *
586
     * @return PageSeo
587
     */
588
    public function setTwitterTitle($twitterTitle)
589
    {
590
        $this->twitterTitle = $twitterTitle;
591
592
        return $this;
593
    }
594
595
    /**
596
     * Get twitterTitle.
597
     *
598
     * @return string
599
     */
600
    public function getTwitterTitle()
601
    {
602
        return $this->twitterTitle;
603
    }
604
605
    /**
606
     * Set twitterDescription.
607
     *
608
     * @param string $twitterDescription
609
     *
610
     * @return PageSeo
611
     */
612
    public function setTwitterDescription($twitterDescription)
613
    {
614
        $this->twitterDescription = $twitterDescription;
615
616
        return $this;
617
    }
618
619
    /**
620
     * Get twitterDescription.
621
     *
622
     * @return string
623
     */
624
    public function getTwitterDescription()
625
    {
626
        return $this->twitterDescription;
627
    }
628
629
    /**
630
     * Set twitterImage.
631
     *
632
     * @param Image $twitterImage
633
     *
634
     * @return PageSeo
635
     */
636
    public function setTwitterImage($twitterImage)
637
    {
638
        $this->twitterImage = $twitterImage;
0 ignored issues
show
Documentation Bug introduced by
It seems like $twitterImage of type object<Victoire\Bundle\SeoBundle\Entity\Image> is incompatible with the declared type string of property $twitterImage.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
639
640
        return $this;
641
    }
642
643
    /**
644
     * Get twitterImage.
645
     *
646
     * @return string
647
     */
648
    public function getTwitterImage()
649
    {
650
        return $this->twitterImage;
651
    }
652
653
    /**
654
     * Set schemaPageType.
655
     *
656
     * @param string $schemaPageType
657
     *
658
     * @return PageSeo
659
     */
660
    public function setSchemaPageType($schemaPageType)
661
    {
662
        $this->schemaPageType = $schemaPageType;
663
664
        return $this;
665
    }
666
667
    /**
668
     * Get schemaPageType.
669
     *
670
     * @return string
671
     */
672
    public function getSchemaPageType()
673
    {
674
        return $this->schemaPageType;
675
    }
676
677
    /**
678
     * Set schemaName.
679
     *
680
     * @param string $schemaName
681
     *
682
     * @return PageSeo
683
     */
684
    public function setSchemaName($schemaName)
685
    {
686
        $this->schemaName = $schemaName;
687
688
        return $this;
689
    }
690
691
    /**
692
     * Get schemaName.
693
     *
694
     * @return string
695
     */
696
    public function getSchemaName()
697
    {
698
        return $this->schemaName;
699
    }
700
701
    /**
702
     * Set schemaDescription.
703
     *
704
     * @param string $schemaDescription
705
     *
706
     * @return PageSeo
707
     */
708
    public function setSchemaDescription($schemaDescription)
709
    {
710
        $this->schemaDescription = $schemaDescription;
711
712
        return $this;
713
    }
714
715
    /**
716
     * Get schemaDescription.
717
     *
718
     * @return string
719
     */
720
    public function getSchemaDescription()
721
    {
722
        return $this->schemaDescription;
723
    }
724
725
    /**
726
     * Set schemaImage.
727
     *
728
     * @param Image $schemaImage
729
     *
730
     * @return PageSeo
731
     */
732
    public function setSchemaImage($schemaImage)
733
    {
734
        $this->schemaImage = $schemaImage;
0 ignored issues
show
Documentation Bug introduced by
It seems like $schemaImage of type object<Victoire\Bundle\SeoBundle\Entity\Image> is incompatible with the declared type string of property $schemaImage.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
735
736
        return $this;
737
    }
738
739
    /**
740
     * Get schemaImage.
741
     *
742
     * @return string
743
     */
744
    public function getSchemaImage()
745
    {
746
        return $this->schemaImage;
747
    }
748
749
    /**
750
     * Set metaRobotsIndex.
751
     *
752
     * @param string $metaRobotsIndex
753
     *
754
     * @return PageSeo
755
     */
756
    public function setMetaRobotsIndex($metaRobotsIndex)
757
    {
758
        $this->metaRobotsIndex = $metaRobotsIndex;
759
760
        return $this;
761
    }
762
763
    /**
764
     * Get metaRobotsIndex.
765
     *
766
     * @return string
767
     */
768
    public function getMetaRobotsIndex()
769
    {
770
        return $this->metaRobotsIndex;
771
    }
772
773
    /**
774
     * Set metaRobotsFollow.
775
     *
776
     * @param string $metaRobotsFollow
777
     *
778
     * @return PageSeo
779
     */
780
    public function setMetaRobotsFollow($metaRobotsFollow)
781
    {
782
        $this->metaRobotsFollow = $metaRobotsFollow;
783
784
        return $this;
785
    }
786
787
    /**
788
     * Get metaRobotsFollow.
789
     *
790
     * @return string
791
     */
792
    public function getMetaRobotsFollow()
793
    {
794
        return $this->metaRobotsFollow;
795
    }
796
797
    /**
798
     * Set metaRobotsAdvanced.
799
     *
800
     * @param string $metaRobotsAdvanced
801
     *
802
     * @return PageSeo
803
     */
804
    public function setMetaRobotsAdvanced($metaRobotsAdvanced)
805
    {
806
        $this->metaRobotsAdvanced = $metaRobotsAdvanced;
807
808
        return $this;
809
    }
810
811
    /**
812
     * Get metaRobotsAdvanced.
813
     *
814
     * @return string
815
     */
816
    public function getMetaRobotsAdvanced()
817
    {
818
        return $this->metaRobotsAdvanced;
819
    }
820
821
    /**
822
     * Set sitemapIndexed.
823
     *
824
     * @param bool $sitemapIndexed
825
     *
826
     * @return PageSeo
827
     */
828
    public function setSitemapIndexed($sitemapIndexed)
829
    {
830
        $this->sitemapIndexed = $sitemapIndexed;
831
832
        return $this;
833
    }
834
835
    /**
836
     * Get sitemapIndexed.
837
     *
838
     * @return bool
839
     */
840
    public function isSitemapIndexed()
841
    {
842
        return $this->sitemapIndexed;
843
    }
844
845
    /**
846
     * Set sitemapPriority.
847
     *
848
     * @param float $sitemapPriority
849
     *
850
     * @return PageSeo
851
     */
852
    public function setSitemapPriority($sitemapPriority)
853
    {
854
        $this->sitemapPriority = $sitemapPriority;
855
856
        return $this;
857
    }
858
859
    /**
860
     * Get sitemapPriority.
861
     *
862
     * @return float
863
     */
864
    public function getSitemapPriority()
865
    {
866
        return $this->sitemapPriority;
867
    }
868
869
    /**
870
     * Set sitemapChangeFreq.
871
     *
872
     * @param float $sitemapChangeFreq
873
     *
874
     * @return PageSeo
875
     */
876
    public function setSitemapChangeFreq($sitemapChangeFreq)
877
    {
878
        $this->sitemapChangeFreq = $sitemapChangeFreq;
0 ignored issues
show
Documentation Bug introduced by
The property $sitemapChangeFreq was declared of type string, but $sitemapChangeFreq is of type double. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
879
880
        return $this;
881
    }
882
883
    /**
884
     * Get sitemapChangeFreq.
885
     *
886
     * @return float
887
     */
888
    public function getSitemapChangeFreq()
889
    {
890
        return $this->sitemapChangeFreq;
891
    }
892
893
    /**
894
     * Set relCanonical.
895
     *
896
     * @param string $relCanonical
897
     *
898
     * @return PageSeo
899
     */
900
    public function setRelCanonical($relCanonical)
901
    {
902
        $this->relCanonical = $relCanonical;
903
904
        return $this;
905
    }
906
907
    /**
908
     * Get relCanonical.
909
     *
910
     * @return string
911
     */
912
    public function getRelCanonical()
913
    {
914
        return $this->relCanonical;
915
    }
916
917
    /**
918
     * Set keyword.
919
     *
920
     * @param string $keyword
921
     *
922
     * @return PageSeo
923
     */
924
    public function setKeyword($keyword)
925
    {
926
        $this->keyword = $keyword;
927
928
        return $this;
929
    }
930
931
    /**
932
     * Get keyword.
933
     *
934
     * @return string
935
     */
936
    public function getKeyword()
937
    {
938
        return $this->keyword;
939
    }
940
}
941