Internal: Add @Assert\NotBlank()

pull/3513/head
Julio Montoya 5 years ago
parent 56968071ad
commit dbcd95abda
  1. 3
      src/CourseBundle/Entity/CAnnouncement.php
  2. 3
      src/CourseBundle/Entity/CBlog.php
  3. 3
      src/CourseBundle/Entity/CCalendarEvent.php
  4. 3
      src/CourseBundle/Entity/CCourseSetting.php
  5. 3
      src/CourseBundle/Entity/CDropboxCategory.php
  6. 10
      src/CourseBundle/Entity/CExerciseCategory.php
  7. 1
      src/CourseBundle/Entity/CForumCategory.php
  8. 1
      src/CourseBundle/Entity/CForumForum.php
  9. 2
      src/CourseBundle/Entity/CForumThread.php
  10. 18
      src/CourseBundle/Entity/CLpItem.php
  11. 2
      src/CourseBundle/Entity/CQuizQuestion.php
  12. 14
      src/CourseBundle/Entity/CStudentPublication.php
  13. 2
      src/CourseBundle/Entity/CThematic.php
  14. 17
      src/CourseBundle/Entity/CThematicPlan.php
  15. 2
      src/CourseBundle/Entity/CWiki.php

@ -7,6 +7,7 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CAnnouncement.
@ -28,6 +29,8 @@ class CAnnouncement extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="title", type="text", nullable=true)
*/
protected $title;

@ -5,6 +5,7 @@
namespace Chamilo\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CBlog.
@ -45,7 +46,7 @@ class CBlog
/**
* @var string
*
* @Assert\NotBlank()
* @ORM\Column(name="blog_name", type="string", length=250, nullable=false)
*/
protected $blogName;

@ -9,6 +9,7 @@ use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CoreBundle\Entity\Room;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CCalendarEvent.
@ -42,7 +43,7 @@ class CCalendarEvent extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
protected $title;

@ -5,6 +5,7 @@
namespace Chamilo\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CCourseSetting.
@ -38,6 +39,8 @@ class CCourseSetting
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="variable", type="string", length=255, nullable=false)
*/
protected $variable;

@ -5,6 +5,7 @@
namespace Chamilo\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CDropboxCategory.
@ -46,6 +47,8 @@ class CDropboxCategory
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="cat_name", type="text", nullable=false)
*/
protected $catName;

@ -31,16 +31,6 @@ class CExerciseCategory extends AbstractResource implements ResourceInterface
*/
protected $id;
/**
* @var Course
*
* Gedmo\SortableGroup
*
* ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CExerciseCategory", inversedBy="children")
* ORM\JoinColumn(referencedColumnName="id", onDelete="SET NULL")
*/
//protected $course;
/**
* @var Course
*

@ -42,6 +42,7 @@ class CForumCategory extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="cat_title", type="string", length=255, nullable=false)

@ -42,6 +42,7 @@ class CForumForum extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank
*
* @ORM\Column(name="forum_title", type="string", length=255, nullable=false)

@ -42,7 +42,9 @@ class CForumThread extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="thread_title", type="string", length=255, nullable=true)
*/
protected $threadTitle;

@ -48,23 +48,27 @@ class CLpItem
/**
* @var string
*
* @ORM\Column(name="item_type", type="string", length=32, nullable=false)
* @Assert\NotBlank()
*
* @ORM\Column(name="title", type="string", length=511, nullable=false)
*/
protected $itemType;
protected $title;
/**
* @var string
*
* @ORM\Column(name="ref", type="text", nullable=false)
* @Assert\NotBlank()
*
* @ORM\Column(name="item_type", type="string", length=32, nullable=false)
*/
protected $ref;
protected $itemType;
/**
* @var string
* @Assert\NotBlank()
* @ORM\Column(name="title", type="string", length=511, nullable=false)
*
* @ORM\Column(name="ref", type="text", nullable=false)
*/
protected $title;
protected $ref;
/**
* @var string

@ -43,7 +43,9 @@ class CQuizQuestion extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="question", type="text", nullable=false)
*/
protected $question;

@ -34,6 +34,13 @@ class CStudentPublication extends AbstractResource implements ResourceInterface
*/
protected $iid;
/**
* @var string
* @Assert\NotBlank()
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
protected $title;
/**
* @var int
*
@ -55,13 +62,6 @@ class CStudentPublication extends AbstractResource implements ResourceInterface
*/
protected $urlCorrection;
/**
* @var string
* @Assert\NotBlank()
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
protected $title;
/**
* @var string
*

@ -42,7 +42,9 @@ class CThematic extends AbstractResource implements ResourceInterface
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="title", type="text", nullable=false)
*/
protected $title;

@ -7,6 +7,7 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* CThematicPlan.
@ -31,6 +32,15 @@ class CThematicPlan extends AbstractResource implements ResourceInterface
*/
protected $iid;
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
protected $title;
/**
* @var int
*
@ -46,13 +56,6 @@ class CThematicPlan extends AbstractResource implements ResourceInterface
*/
protected $thematic;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
protected $title;
/**
* @var string
*

@ -57,7 +57,9 @@ class CWiki
/**
* @var string
*
* @Assert\NotBlank()
*
* @ORM\Column(name="title", type="string", length=255, nullable=false)
*/
protected $title;

Loading…
Cancel
Save