Minor - fix php notice, replace private with protected

pull/2624/head
Julio Montoya 8 years ago
parent a7567be9c5
commit 5d6489654a
  1. 30
      src/Chamilo/CourseBundle/Entity/CTool.php
  2. 10
      src/Chamilo/CourseBundle/Entity/CToolIntro.php
  3. 34
      src/Chamilo/UserBundle/Entity/User.php
  4. 6
      src/Chamilo/UserBundle/Repository/UserRepository.php

@ -26,105 +26,105 @@ class CTool
* @ORM\Id
* @ORM\GeneratedValue
*/
private $iid;
protected $iid;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=true)
*/
private $id;
protected $id;
/**
* @var int
*
* @ORM\Column(name="c_id", type="integer")
*/
private $cId;
protected $cId;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
private $name;
protected $name;
/**
* @var string
*
* @ORM\Column(name="link", type="string", length=255, nullable=false)
*/
private $link;
protected $link;
/**
* @var string
*
* @ORM\Column(name="image", type="string", length=255, nullable=true)
*/
private $image;
protected $image;
/**
* @var bool
*
* @ORM\Column(name="visibility", type="boolean", nullable=true)
*/
private $visibility;
protected $visibility;
/**
* @var string
*
* @ORM\Column(name="admin", type="string", length=255, nullable=true)
*/
private $admin;
protected $admin;
/**
* @var string
*
* @ORM\Column(name="address", type="string", length=255, nullable=true)
*/
private $address;
protected $address;
/**
* @var bool
*
* @ORM\Column(name="added_tool", type="boolean", nullable=true)
*/
private $addedTool;
protected $addedTool;
/**
* @var string
*
* @ORM\Column(name="target", type="string", length=20, nullable=false)
*/
private $target;
protected $target;
/**
* @var string
*
* @ORM\Column(name="category", type="string", length=20, nullable=false, options={"default" = "authoring"})
*/
private $category;
protected $category;
/**
* @var int
*
* @ORM\Column(name="session_id", type="integer", nullable=true)
*/
private $sessionId;
protected $sessionId;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
protected $description;
/**
* @var string
*
* @ORM\Column(name="custom_icon", type="string", length=255, nullable=true)
*/
private $customIcon;
protected $customIcon;
/**
* @return int

@ -25,35 +25,35 @@ class CToolIntro
* @ORM\Id
* @ORM\GeneratedValue
*/
private $iid;
protected $iid;
/**
* @var int
*
* @ORM\Column(name="c_id", type="integer")
*/
private $cId;
protected $cId;
/**
* @var int
*
* @ORM\Column(name="id", type="string", nullable=false)
*/
private $id;
protected $id;
/**
* @var string
*
* @ORM\Column(name="intro_text", type="text", nullable=false)
*/
private $introText;
protected $introText;
/**
* @var int
*
* @ORM\Column(name="session_id", type="integer")
*/
private $sessionId;
protected $sessionId;
/**
* Set introText.

@ -2487,6 +2487,18 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
return $this->achievedSkills;
}
/**
* @param $value
*
* @return $this
*/
public function setAchievedSkills($value)
{
$this->achievedSkills = $value;
return $this;
}
/**
* Check if the user has the skill.
*
@ -2550,4 +2562,26 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
return $this;
}
/**
* @return mixed
*/
public function getCommentedUserSkills()
{
return $this->commentedUserSkills;
}
/**
* @param mixed $commentedUserSkills
*
* @return User
*/
public function setCommentedUserSkills($commentedUserSkills)
{
$this->commentedUserSkills = $commentedUserSkills;
return $this;
}
}

@ -482,13 +482,15 @@ class UserRepository extends EntityRepository
$user->setGroups([]);
$user->setCurriculumItems([]);
$user->setPortals([]);
$user->setSessionCourseSubscriptions([]);
$user->setSessionAsGeneralCoach([]);
$user->setAchievedSkills([]);
$user->setCommentedUserSkills([]);
$extraFieldValues = new \ExtraFieldValue('user');
$items = $extraFieldValues->getAllValuesByItem($userId);
$user->setExtraFields($items);
$user->setSessionCourseSubscriptions([]);
$user->setSessionAsGeneralCoach([]);
$lastLogin = $user->getLastLogin();
if (empty($lastLogin)) {

Loading…
Cancel
Save