Exemplo n.º 1
0
 /**
  * Attribute constructor.
  *
  * @param string $name
  * @param User   $user
  * @param int    $displayOrder
  * @param string $displayId
  */
 private function __construct($name, User $user, $displayOrder = 0, $displayId = null)
 {
     $this->displayId = $displayId === null ? com_create_guid() : $displayId;
     $this->name = $name;
     $this->displayOrder = $displayOrder;
     $this->active = true;
     $this->addedDate = new DateTime();
     $this->addedBy = $user->getUserName();
     $this->updatedDate = null;
     $this->updatedBy = null;
     $this->values = array();
 }
Exemplo n.º 2
0
 /**
  * User constructor.
  *
  * @param string $username
  * @param string $password
  * @param string $card
  * @param string $image
  * @param string $roleId
  * @param User   $user
  * @param string $displayId
  */
 public function __construct($username, $password, $card, $image, $roleId, User $user, $displayId = null)
 {
     parent::__construct();
     $this->displayId = $displayId === null ? com_create_guid() : $displayId;
     $this->username = $username;
     $this->password = $password;
     $this->card = $card;
     $this->image = $image;
     $this->roleId = $roleId;
     $this->visible = true;
     $this->addedDate = new \DateTime();
     $this->addedBy = $user->getUsername();
     $this->updatedDate = null;
     $this->updatedBy = null;
 }