Skip to content

Commit

Permalink
Skill: Set default courses
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Nov 5, 2021
1 parent c3f16d9 commit c2e44d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Chamilo/CoreBundle/Entity/Skill.php
Expand Up @@ -110,6 +110,11 @@ class Skill
*/
protected $updatedAt;

public function __construct()
{
$this->courses = new ArrayCollection();
}

/**
* @return string
*/
Expand Down Expand Up @@ -415,6 +420,11 @@ public function addItem(SkillRelItem $skillRelItem)
$this->items[] = $skillRelItem;
}

public function hasCourses()
{
return null !== $this->courses;
}

/**
* @return ArrayCollection
*/
Expand Down

0 comments on commit c2e44d7

Please sign in to comment.