本文整理汇总了PHP中FOS\UserBundle\Entity\User::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP User::__construct方法的具体用法?PHP User::__construct怎么用?PHP User::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOS\UserBundle\Entity\User
的用法示例。
在下文中一共展示了User::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->packages = new ArrayCollection();
$this->authors = new ArrayCollection();
$this->createdAt = new \DateTime();
parent::__construct();
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->campaigns = new ArrayCollection();
$this->tasks = new ArrayCollection();
$this->files = new ArrayCollection();
}
示例3: __construct
public function __construct()
{
parent::__construct();
if (empty($this->roles)) {
$this->roles[] = 'ROLE_USER';
}
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->setEnabled(true);
$this->setLocked(false);
// your own logic
}
示例5: __construct
/**
* Creates a user
*/
public function __construct()
{
parent::__construct();
$this->lastLocation = new Location();
$this->lastLocation->setLatitude(0);
$this->lastLocation->setLongitude(0);
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->isActive = true;
// may not be needed, see section on salt below
// $this->salt = md5(uniqid(null, true));
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->created = new \DateTime();
$this->activated = false;
$this->enabled = true;
}
示例8: __construct
public function __construct()
{
parent::__construct();
// your own logic
$this->groups = new \Doctrine\Common\Collections\ArrayCollection();
$this->projects = new \Doctrine\Common\Collections\ArrayCollection();
$this->tasks = new \Doctrine\Common\Collections\ArrayCollection();
}
示例9: __construct
public function __construct()
{
parent::__construct();
// your own logic
$this->locked = true;
$this->applications = new ArrayCollection();
$this->providers = new ArrayCollection();
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->friendWithMe = new \Doctrine\Common\Collections\ArrayCollection();
$this->myFriends = new \Doctrine\Common\Collections\ArrayCollection();
$this->apiKey = substr(str_shuffle('0123456789AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn'), 32);
$this->roles = array('ROLE_USER');
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->created = new \DateTime();
$this->lastActivity = new \DateTime();
$this->image = new \Ben\DoctorsBundle\Entity\image();
$this->consultations = new \Doctrine\Common\Collections\ArrayCollection();
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->days = 10;
$this->alertEmail = false;
$this->alertDays = 1;
$this->emailVisible = false;
$this->homepage = 'Aucune';
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->email = null;
// note: when saving the user manager will put the email canonical
// to empty string hence why we removed the unique constraint,
// to avoid error being thrown when registering a user only with
// phone number
$this->emailCanonical = null;
}
示例14: __construct
public function __construct()
{
parent::__construct();
// your own logic
//$this->entidad = new ArrayCollection();
$this->rols = new ArrayCollection();
$this->auditDeleted = false;
$this->userInternoTipo = null;
$this->auditDateIns = new \DateTime();
$this->algorithm = 'sha512';
}
示例15: __construct
public function __construct()
{
parent::__construct();
/* @var $doctrine \Doctrine\Bundle\DoctrineBundle\Registry */
$doctrine = \AppKernel::getStaticContainer()->get('doctrine');
/* @var $em \Doctrine\ORM\EntityManager */
$em = $doctrine->getManager();
$this->setEnabled(true);
$group = $em->getRepository('ApplicationSonataUserBundle:Group')->find(static::GroupId);
if ($group) {
$this->addGroup($group);
}
}