mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Regenerate doctrine entities and proxies
This commit is contained in:
@@ -471,7 +471,7 @@ class Manager
|
||||
$attribute->setValue($fileAttribute->asString());
|
||||
$attribute->setLazaretFile($lazaretFile);
|
||||
|
||||
$lazaretFile->addLazaretAttribute($attribute);
|
||||
$lazaretFile->addAttribute($attribute);
|
||||
|
||||
$this->app['EM']->persist($attribute);
|
||||
}
|
||||
@@ -483,7 +483,7 @@ class Manager
|
||||
$check->setCheckClassname(get_class($response->getChecker()));
|
||||
$check->setLazaretFile($lazaretFile);
|
||||
|
||||
$lazaretFile->addLazaretCheck($check);
|
||||
$lazaretFile->addCheck($check);
|
||||
|
||||
$this->app['EM']->persist($check);
|
||||
}
|
||||
|
@@ -224,7 +224,7 @@ class Baskets implements ControllerProviderInterface
|
||||
$basketElement = new BasketElement();
|
||||
$basketElement->setRecord($record);
|
||||
$basketElement->setBasket($basket);
|
||||
$basket->addBasketElement($basketElement);
|
||||
$basket->addElement($basketElement);
|
||||
|
||||
$app['EM']->persist($basket);
|
||||
|
||||
|
@@ -190,7 +190,7 @@ class Basket implements ControllerProviderInterface
|
||||
|
||||
$app['EM']->persist($basket_element);
|
||||
|
||||
$Basket->addBasketElement($basket_element);
|
||||
$Basket->addElement($basket_element);
|
||||
|
||||
$n++;
|
||||
}
|
||||
@@ -390,7 +390,7 @@ class Basket implements ControllerProviderInterface
|
||||
|
||||
$app['EM']->persist($basket_element);
|
||||
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
|
||||
if (null !== $validationSession = $basket->getValidation()) {
|
||||
|
||||
@@ -438,7 +438,7 @@ class Basket implements ControllerProviderInterface
|
||||
}
|
||||
|
||||
$basket_element->setBasket($basket);
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
$n++;
|
||||
}
|
||||
|
||||
|
@@ -198,7 +198,7 @@ class Push implements ControllerProviderInterface
|
||||
|
||||
$app['EM']->persist($BasketElement);
|
||||
|
||||
$Basket->addBasketElement($BasketElement);
|
||||
$Basket->addElement($BasketElement);
|
||||
|
||||
if ($receiver['HD']) {
|
||||
$user_receiver->ACL()->grant_hd_on(
|
||||
@@ -314,7 +314,7 @@ class Push implements ControllerProviderInterface
|
||||
|
||||
$app['EM']->persist($BasketElement);
|
||||
|
||||
$Basket->addBasketElement($BasketElement);
|
||||
$Basket->addElement($BasketElement);
|
||||
}
|
||||
$app['EM']->flush();
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class Push implements ControllerProviderInterface
|
||||
$app['phraseanet.logger']($BasketElement->getRecord($app)->get_databox())
|
||||
->log($BasketElement->getRecord($app), \Session_Logger::EVENT_PUSH, $participant_user->get_id(), '');
|
||||
|
||||
$Participant->addValidationData($ValidationData);
|
||||
$Participant->addData($ValidationData);
|
||||
}
|
||||
|
||||
$Participant = $app['EM']->merge($Participant);
|
||||
|
@@ -198,7 +198,7 @@ class UsrLists implements ControllerProviderInterface
|
||||
$Owner->setList($List);
|
||||
|
||||
$List->setName($list_name);
|
||||
$List->addUsrListOwner($Owner);
|
||||
$List->addOwner($Owner);
|
||||
|
||||
$app['EM']->persist($Owner);
|
||||
$app['EM']->persist($List);
|
||||
@@ -410,7 +410,7 @@ class UsrLists implements ControllerProviderInterface
|
||||
$entry->setUser($user_entry);
|
||||
$entry->setList($list);
|
||||
|
||||
$list->addUsrListEntry($entry);
|
||||
$list->addEntrie($entry);
|
||||
|
||||
$app['EM']->persist($entry);
|
||||
|
||||
@@ -505,7 +505,7 @@ class UsrLists implements ControllerProviderInterface
|
||||
$owner->setList($list);
|
||||
$owner->setUser($new_owner);
|
||||
|
||||
$list->addUsrListOwner($owner);
|
||||
$list->addOwner($owner);
|
||||
|
||||
$app['EM']->persist($owner);
|
||||
}
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -34,7 +43,6 @@ class AuthFailure
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
|
@@ -14,9 +14,7 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* Basket
|
||||
*/
|
||||
class Basket
|
||||
{
|
||||
@@ -25,50 +23,63 @@ class Basket
|
||||
const ELEMENTSORDER_ASC = 'asc';
|
||||
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string $name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var text $description
|
||||
* @var string
|
||||
*/
|
||||
protected $description;
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $usr_id;
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var integer $pusher_id
|
||||
* @var boolean
|
||||
*/
|
||||
protected $pusher_id;
|
||||
private $is_read = false;
|
||||
|
||||
/**
|
||||
* @var boolean $archived
|
||||
* @var integer
|
||||
*/
|
||||
protected $archived = false;
|
||||
private $pusher_id;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var boolean
|
||||
*/
|
||||
protected $created;
|
||||
private $archived = false;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var Entities\BasketElement
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $elements;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\ValidationSession
|
||||
*/
|
||||
private $validation;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $elements;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->elements = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
@@ -88,10 +99,13 @@ class Basket
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
* @return Basket
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,17 +121,20 @@ class Basket
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param text $description
|
||||
* @param string $description
|
||||
* @return Basket
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description
|
||||
*
|
||||
* @return text
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
@@ -128,10 +145,13 @@ class Basket
|
||||
* Set usr_id
|
||||
*
|
||||
* @param integer $usrId
|
||||
* @return Basket
|
||||
*/
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,14 +164,52 @@ class Basket
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
public function setOwner(\User_Adapter $user)
|
||||
{
|
||||
$this->setUsrId($user->get_id());
|
||||
}
|
||||
|
||||
public function getOwner(Application $app)
|
||||
{
|
||||
if ($this->getUsrId()) {
|
||||
return \User_Adapter::getInstance($this->getUsrId(), $app);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set is_read
|
||||
*
|
||||
* @param boolean $isRead
|
||||
* @return Basket
|
||||
*/
|
||||
public function setIsRead($isRead)
|
||||
{
|
||||
$this->is_read = $isRead;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get is_read
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsRead()
|
||||
{
|
||||
return $this->is_read;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set pusher_id
|
||||
*
|
||||
* @param integer $pusherId
|
||||
* @return Basket
|
||||
*/
|
||||
public function setPusherId($pusherId)
|
||||
{
|
||||
$this->pusher_id = $pusherId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,14 +222,29 @@ class Basket
|
||||
return $this->pusher_id;
|
||||
}
|
||||
|
||||
public function setPusher(\User_Adapter $user)
|
||||
{
|
||||
$this->setPusherId($user->get_id());
|
||||
}
|
||||
|
||||
public function getPusher(Application $app)
|
||||
{
|
||||
if ($this->getPusherId()) {
|
||||
return \User_Adapter::getInstance($this->getPusherId(), $app);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set archived
|
||||
*
|
||||
* @param boolean $archived
|
||||
* @return Basket
|
||||
*/
|
||||
public function setArchived($archived)
|
||||
{
|
||||
$this->archived = $archived;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,17 +260,20 @@ class Basket
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return Basket
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -207,37 +283,76 @@ class Basket
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return Basket
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set validation
|
||||
*
|
||||
* @param \Entities\ValidationSession $validation
|
||||
* @return Basket
|
||||
*/
|
||||
public function setValidation(\Entities\ValidationSession $validation = null)
|
||||
{
|
||||
$this->validation = $validation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get validation
|
||||
*
|
||||
* @return \Entities\ValidationSession
|
||||
*/
|
||||
public function getValidation()
|
||||
{
|
||||
return $this->validation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements
|
||||
*
|
||||
* @param Entities\BasketElement $elements
|
||||
* @param \Entities\BasketElement $elements
|
||||
* @return Basket
|
||||
*/
|
||||
public function addBasketElement(\Entities\BasketElement $elements)
|
||||
public function addElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->elements[] = $elements;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove elements
|
||||
*
|
||||
* @param \Entities\BasketElement $elements
|
||||
*/
|
||||
public function removeElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->elements->removeElement($elements);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get elements
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getElements()
|
||||
{
|
||||
@@ -319,78 +434,6 @@ class Basket
|
||||
return $total_el1 < $total_el2 ? 1 : -1;
|
||||
}
|
||||
|
||||
public function setPusher(\User_Adapter $user)
|
||||
{
|
||||
$this->setPusherId($user->get_id());
|
||||
}
|
||||
|
||||
public function getPusher(Application $app)
|
||||
{
|
||||
if ($this->getPusherId()) {
|
||||
return \User_Adapter::getInstance($this->getPusherId(), $app);
|
||||
}
|
||||
}
|
||||
|
||||
public function setOwner(\User_Adapter $user)
|
||||
{
|
||||
$this->setUsrId($user->get_id());
|
||||
}
|
||||
|
||||
public function getOwner(Application $app)
|
||||
{
|
||||
if ($this->getUsrId()) {
|
||||
return \User_Adapter::getInstance($this->getUsrId(), $app);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @var Entities\ValidationSession
|
||||
*/
|
||||
protected $validation;
|
||||
|
||||
/**
|
||||
* Set validation
|
||||
*
|
||||
* @param Entities\ValidationSession $validation
|
||||
*/
|
||||
public function setValidation(\Entities\ValidationSession $validation)
|
||||
{
|
||||
$this->validation = $validation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get validation
|
||||
*
|
||||
* @return Entities\ValidationSession
|
||||
*/
|
||||
public function getValidation()
|
||||
{
|
||||
return $this->validation;
|
||||
}
|
||||
/**
|
||||
* @var boolean $is_read
|
||||
*/
|
||||
protected $is_read = true;
|
||||
|
||||
/**
|
||||
* Set is_read
|
||||
*
|
||||
* @param boolean $isRead
|
||||
*/
|
||||
public function setIsRead($isRead)
|
||||
{
|
||||
$this->is_read = $isRead;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get is_read
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsRead()
|
||||
{
|
||||
return $this->is_read;
|
||||
}
|
||||
|
||||
public function hasRecord(Application $app, \record_adapter $record)
|
||||
{
|
||||
foreach ($this->getElements() as $basket_element) {
|
||||
@@ -423,27 +466,4 @@ class Basket
|
||||
|
||||
return $totSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements
|
||||
*
|
||||
* @param \Entities\BasketElement $elements
|
||||
* @return Basket
|
||||
*/
|
||||
public function addElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->elements[] = $elements;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove elements
|
||||
*
|
||||
* @param \Entities\BasketElement $elements
|
||||
*/
|
||||
public function removeElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->elements->removeElement($elements);
|
||||
}
|
||||
}
|
@@ -12,49 +12,60 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Kernel
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* BasketElement
|
||||
*/
|
||||
class BasketElement
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $record_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $record_id;
|
||||
private $record_id;
|
||||
|
||||
/**
|
||||
* @var integer $sbas_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $sbas_id;
|
||||
private $sbas_id;
|
||||
|
||||
/**
|
||||
* @var integer $ord
|
||||
* @var integer
|
||||
*/
|
||||
protected $ord;
|
||||
private $ord;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\Basket
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
protected $basket;
|
||||
private $validation_datas;
|
||||
|
||||
/**
|
||||
* @var \Entities\Basket
|
||||
*/
|
||||
private $basket;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->validation_datas = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -70,10 +81,13 @@ class BasketElement
|
||||
* Set record_id
|
||||
*
|
||||
* @param integer $recordId
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setRecordId($recordId)
|
||||
{
|
||||
$this->record_id = $recordId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,10 +104,13 @@ class BasketElement
|
||||
* Set sbas_id
|
||||
*
|
||||
* @param integer $sbasId
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setSbasId($sbasId)
|
||||
{
|
||||
$this->sbas_id = $sbasId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,14 +123,28 @@ class BasketElement
|
||||
return $this->sbas_id;
|
||||
}
|
||||
|
||||
public function getRecord(Application $app)
|
||||
{
|
||||
return new \record_adapter($app, $this->getSbasId(), $this->getRecordId(), $this->getOrd());
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->setRecordId($record->get_record_id());
|
||||
$this->setSbasId($record->get_sbas_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ord
|
||||
*
|
||||
* @param integer $ord
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setOrd($ord)
|
||||
{
|
||||
$this->ord = $ord;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,17 +160,20 @@ class BasketElement
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -149,87 +183,89 @@ class BasketElement
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add validation_datas
|
||||
*
|
||||
* @param \Entities\ValidationData $validationDatas
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function addValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->validation_datas[] = $validationDatas;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove validation_datas
|
||||
*
|
||||
* @param \Entities\ValidationData $validationDatas
|
||||
*/
|
||||
public function removeValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->validation_datas->removeElement($validationDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get validation_datas
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getValidationDatas()
|
||||
{
|
||||
return $this->validation_datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set basket
|
||||
*
|
||||
* @param Entities\Basket $basket
|
||||
* @param \Entities\Basket $basket
|
||||
* @return BasketElement
|
||||
*/
|
||||
public function setBasket(\Entities\Basket $basket)
|
||||
public function setBasket(\Entities\Basket $basket = null)
|
||||
{
|
||||
$this->basket = $basket;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basket
|
||||
*
|
||||
* @return Entities\Basket
|
||||
* @return \Entities\Basket
|
||||
*/
|
||||
public function getBasket()
|
||||
{
|
||||
return $this->basket;
|
||||
}
|
||||
|
||||
public function getRecord(Application $app)
|
||||
{
|
||||
return new \record_adapter($app, $this->getSbasId(), $this->getRecordId(), $this->getOrd());
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->setRecordId($record->get_record_id());
|
||||
$this->setSbasId($record->get_sbas_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
*/
|
||||
public function setLastInBasket()
|
||||
{
|
||||
$this->setOrd($this->getBasket()->getElements()->count() + 1);
|
||||
}
|
||||
/**
|
||||
* @var Entities\ValidationData
|
||||
*/
|
||||
protected $validation_datas;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->validation_datas = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add validation_datas
|
||||
*
|
||||
* @param Entities\ValidationData $validationDatas
|
||||
*/
|
||||
public function addValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->validation_datas[] = $validationDatas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get validation_datas
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getValidationDatas()
|
||||
{
|
||||
return $this->validation_datas;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -246,14 +282,4 @@ class BasketElement
|
||||
|
||||
throw new \Exception('There is no such participant ' . $user->get_email());
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove validation_datas
|
||||
*
|
||||
* @param \Entities\ValidationData $validationDatas
|
||||
*/
|
||||
public function removeValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->validation_datas->removeElement($validationDatas);
|
||||
}
|
||||
}
|
@@ -1,44 +1,53 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Entities\LazaretAttribute
|
||||
* LazaretAttribute
|
||||
*/
|
||||
class LazaretAttribute
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string $name
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string $value
|
||||
* @var string
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\LazaretFile
|
||||
* @var \Entities\LazaretFile
|
||||
*/
|
||||
private $lazaretFile;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -98,7 +107,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return LazaretAttribute
|
||||
*/
|
||||
public function setCreated($created)
|
||||
@@ -111,7 +120,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -121,7 +130,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return LazaretAttribute
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
@@ -134,7 +143,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
@@ -144,7 +153,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Set lazaretFile
|
||||
*
|
||||
* @param Entities\LazaretFile $lazaretFile
|
||||
* @param \Entities\LazaretFile $lazaretFile
|
||||
* @return LazaretAttribute
|
||||
*/
|
||||
public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null)
|
||||
@@ -157,7 +166,7 @@ class LazaretAttribute
|
||||
/**
|
||||
* Get lazaretFile
|
||||
*
|
||||
* @return Entities\LazaretFile
|
||||
* @return \Entities\LazaretFile
|
||||
*/
|
||||
public function getLazaretFile()
|
||||
{
|
||||
|
@@ -1,28 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Entities\LazaretCheck
|
||||
* LazaretCheck
|
||||
*/
|
||||
class LazaretCheck
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var Entities\LazaretFile
|
||||
*/
|
||||
private $lazaretFile;
|
||||
|
||||
/**
|
||||
* @var string $checkClassname
|
||||
* @var string
|
||||
*/
|
||||
private $checkClassname;
|
||||
|
||||
/**
|
||||
* @var \Entities\LazaretFile
|
||||
*/
|
||||
private $lazaretFile;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -33,29 +43,6 @@ class LazaretCheck
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lazaretFile
|
||||
*
|
||||
* @param Entities\LazaretFile $lazaretFile
|
||||
* @return LazaretCheck
|
||||
*/
|
||||
public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null)
|
||||
{
|
||||
$this->lazaretFile = $lazaretFile;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lazaretFile
|
||||
*
|
||||
* @return Entities\LazaretFile
|
||||
*/
|
||||
public function getLazaretFile()
|
||||
{
|
||||
return $this->lazaretFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set checkClassname
|
||||
*
|
||||
@@ -79,6 +66,29 @@ class LazaretCheck
|
||||
return $this->checkClassname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lazaretFile
|
||||
*
|
||||
* @param \Entities\LazaretFile $lazaretFile
|
||||
* @return LazaretCheck
|
||||
*/
|
||||
public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null)
|
||||
{
|
||||
$this->lazaretFile = $lazaretFile;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lazaretFile
|
||||
*
|
||||
* @return \Entities\LazaretFile
|
||||
*/
|
||||
public function getLazaretFile()
|
||||
{
|
||||
return $this->lazaretFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checker message
|
||||
*
|
||||
|
@@ -1,72 +1,95 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Entities\LazaretFile
|
||||
* LazaretFile
|
||||
*/
|
||||
class LazaretFile
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $base_id
|
||||
* @var string
|
||||
*/
|
||||
private $base_id;
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* @var string $uuid
|
||||
* @var string
|
||||
*/
|
||||
private $uuid;
|
||||
private $thumbFilename;
|
||||
|
||||
/**
|
||||
* @var string $sha256
|
||||
*/
|
||||
private $sha256;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\ArrayCollection
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var Entities\LazaretSession
|
||||
*/
|
||||
private $session;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\ArrayCollection
|
||||
*/
|
||||
private $checks;
|
||||
|
||||
/**
|
||||
* @var string $originalName
|
||||
* @var string
|
||||
*/
|
||||
private $originalName;
|
||||
|
||||
/**
|
||||
* @var boolean $forced
|
||||
* @var integer
|
||||
*/
|
||||
private $base_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uuid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sha256;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $forced = false;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $checks;
|
||||
|
||||
/**
|
||||
* @var \Entities\LazaretSession
|
||||
*/
|
||||
private $session;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->attributes = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
$this->checks = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,6 +102,75 @@ class LazaretFile
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set filename
|
||||
*
|
||||
* @param string $filename
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setFilename($filename)
|
||||
{
|
||||
$this->filename = $filename;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFilename()
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set thumbFilename
|
||||
*
|
||||
* @param string $thumbFilename
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setThumbFilename($thumbFilename)
|
||||
{
|
||||
$this->thumbFilename = $thumbFilename;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get thumbFilename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getThumbFilename()
|
||||
{
|
||||
return $this->thumbFilename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set originalName
|
||||
*
|
||||
* @param string $originalName
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setOriginalName($originalName)
|
||||
{
|
||||
$this->originalName = $originalName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get originalName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOriginalName()
|
||||
{
|
||||
return $this->originalName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set base_id
|
||||
*
|
||||
@@ -102,6 +194,16 @@ class LazaretFile
|
||||
return $this->base_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Destination Collection
|
||||
*
|
||||
* @return \collection
|
||||
*/
|
||||
public function getCollection(Application $app)
|
||||
{
|
||||
return \collection::get_from_base_id($app, $this->getBaseId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set uuid
|
||||
*
|
||||
@@ -148,144 +250,6 @@ class LazaretFile
|
||||
return $this->sha256;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add attributes
|
||||
*
|
||||
* @param Entities\LazaretAttribute $attributes
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addLazaretAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->attributes[] = $attributes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributes
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getAttributes()
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set session
|
||||
*
|
||||
* @param Entities\LazaretSession $session
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setSession(\Entities\LazaretSession $session = null)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*
|
||||
* @return Entities\LazaretSession
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
return $this->session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set originalName
|
||||
*
|
||||
* @param string $originalName
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setOriginalName($originalName)
|
||||
{
|
||||
$this->originalName = $originalName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get originalName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOriginalName()
|
||||
{
|
||||
return $this->originalName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add checks
|
||||
*
|
||||
* @param Entities\LazaretCheck $checks
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addLazaretCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->checks[] = $checks;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checks
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getChecks()
|
||||
{
|
||||
return $this->checks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set forced
|
||||
*
|
||||
@@ -310,13 +274,138 @@ class LazaretFile
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Destination Collection
|
||||
* Set created
|
||||
*
|
||||
* @return \collection
|
||||
* @param \DateTime $created
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function getCollection(Application $app)
|
||||
public function setCreated($created)
|
||||
{
|
||||
return \collection::get_from_base_id($app, $this->getBaseId());
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param \DateTime $updated
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add attributes
|
||||
*
|
||||
* @param \Entities\LazaretAttribute $attributes
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->attributes[] = $attributes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove attributes
|
||||
*
|
||||
* @param \Entities\LazaretAttribute $attributes
|
||||
*/
|
||||
public function removeAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->attributes->removeElement($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributes
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getAttributes()
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add checks
|
||||
*
|
||||
* @param \Entities\LazaretCheck $checks
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->checks[] = $checks;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove checks
|
||||
*
|
||||
* @param \Entities\LazaretCheck $checks
|
||||
*/
|
||||
public function removeCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->checks->removeElement($checks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checks
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getChecks()
|
||||
{
|
||||
return $this->checks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set session
|
||||
*
|
||||
* @param \Entities\LazaretSession $session
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setSession(\Entities\LazaretSession $session = null)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*
|
||||
* @return \Entities\LazaretSession
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
return $this->session;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,105 +435,4 @@ class LazaretFile
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $filename
|
||||
*/
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* @var string $thumbFilename
|
||||
*/
|
||||
private $thumbFilename;
|
||||
|
||||
|
||||
/**
|
||||
* Set filename
|
||||
*
|
||||
* @param string $filename
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setFilename($filename)
|
||||
{
|
||||
$this->filename = $filename;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFilename()
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set thumbFilename
|
||||
*
|
||||
* @param string $thumbFilename
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function setThumbFilename($thumbFilename)
|
||||
{
|
||||
$this->thumbFilename = $thumbFilename;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get thumbFilename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getThumbFilename()
|
||||
{
|
||||
return $this->thumbFilename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add attributes
|
||||
*
|
||||
* @param \Entities\LazaretAttribute $attributes
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->attributes[] = $attributes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove attributes
|
||||
*
|
||||
* @param \Entities\LazaretAttribute $attributes
|
||||
*/
|
||||
public function removeAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->attributes->removeElement($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add checks
|
||||
*
|
||||
* @param \Entities\LazaretCheck $checks
|
||||
* @return LazaretFile
|
||||
*/
|
||||
public function addCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->checks[] = $checks;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove checks
|
||||
*
|
||||
* @param \Entities\LazaretCheck $checks
|
||||
*/
|
||||
public function removeCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->checks->removeElement($checks);
|
||||
}
|
||||
}
|
@@ -1,39 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Entities\LazaretSession
|
||||
* LazaretSession
|
||||
*/
|
||||
class LazaretSession
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\ArrayCollection
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $files;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->files = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
@@ -62,6 +74,16 @@ class LazaretSession
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get usr_id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getUsrId()
|
||||
{
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
@@ -83,7 +105,7 @@ class LazaretSession
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return LazaretSession
|
||||
*/
|
||||
public function setCreated($created)
|
||||
@@ -96,7 +118,7 @@ class LazaretSession
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -106,7 +128,7 @@ class LazaretSession
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return LazaretSession
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
@@ -119,59 +141,13 @@ class LazaretSession
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add files
|
||||
*
|
||||
* @param Entities\LazaretFile $files
|
||||
* @return LazaretSession
|
||||
*/
|
||||
public function addLazaretFiles(\Entities\LazaretFile $files)
|
||||
{
|
||||
$this->files[] = $files;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get files
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add files
|
||||
*
|
||||
* @param Entities\LazaretFile $files
|
||||
* @return LazaretSession
|
||||
*/
|
||||
public function addLazaretFile(\Entities\LazaretFile $files)
|
||||
{
|
||||
$this->files[] = $files;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get usr_id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getUsrId()
|
||||
{
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add files
|
||||
*
|
||||
@@ -194,4 +170,14 @@ class LazaretSession
|
||||
{
|
||||
$this->files->removeElement($files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get files
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
}
|
@@ -1,80 +1,101 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Entities\Session
|
||||
* Session
|
||||
*/
|
||||
class Session
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var string $user_agent
|
||||
* @var string
|
||||
*/
|
||||
private $user_agent;
|
||||
|
||||
/**
|
||||
* @var string $ip_address
|
||||
* @var string
|
||||
*/
|
||||
private $ip_address;
|
||||
|
||||
/**
|
||||
* @var string $platform
|
||||
* @var string
|
||||
*/
|
||||
private $platform;
|
||||
|
||||
/**
|
||||
* @var string $browser_name
|
||||
* @var string
|
||||
*/
|
||||
private $browser_name;
|
||||
|
||||
/**
|
||||
* @var string $browser_version
|
||||
* @var string
|
||||
*/
|
||||
private $browser_version;
|
||||
|
||||
/**
|
||||
* @var integer $screen_width
|
||||
* @var integer
|
||||
*/
|
||||
private $screen_width;
|
||||
|
||||
/**
|
||||
* @var integer $screen_height
|
||||
* @var integer
|
||||
*/
|
||||
private $screen_height;
|
||||
|
||||
/**
|
||||
* @var string $token
|
||||
* @var string
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* @var string $nonce
|
||||
* @var string
|
||||
*/
|
||||
private $nonce;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $modules;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->modules = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -99,6 +120,7 @@ class Session
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -128,6 +150,7 @@ class Session
|
||||
public function setUserAgent($userAgent)
|
||||
{
|
||||
$this->user_agent = $userAgent;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -150,6 +173,7 @@ class Session
|
||||
public function setIpAddress($ipAddress)
|
||||
{
|
||||
$this->ip_address = $ipAddress;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -172,6 +196,7 @@ class Session
|
||||
public function setPlatform($platform)
|
||||
{
|
||||
$this->platform = $platform;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -194,6 +219,7 @@ class Session
|
||||
public function setBrowserName($browserName)
|
||||
{
|
||||
$this->browser_name = $browserName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -216,6 +242,7 @@ class Session
|
||||
public function setBrowserVersion($browserVersion)
|
||||
{
|
||||
$this->browser_version = $browserVersion;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -238,6 +265,7 @@ class Session
|
||||
public function setScreenWidth($screenWidth)
|
||||
{
|
||||
$this->screen_width = $screenWidth;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -260,6 +288,7 @@ class Session
|
||||
public function setScreenHeight($screenHeight)
|
||||
{
|
||||
$this->screen_height = $screenHeight;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -282,6 +311,7 @@ class Session
|
||||
public function setToken($token)
|
||||
{
|
||||
$this->token = $token;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -304,6 +334,7 @@ class Session
|
||||
public function setNonce($nonce)
|
||||
{
|
||||
$this->nonce = $nonce;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -320,19 +351,20 @@ class Session
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return Session
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -342,50 +374,53 @@ class Session
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return Session
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\ArrayCollection
|
||||
*/
|
||||
private $modules;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->modules = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add modules
|
||||
*
|
||||
* @param Entities\SessionModule $modules
|
||||
* @param \Entities\SessionModule $modules
|
||||
* @return Session
|
||||
*/
|
||||
public function addSessionModule(\Entities\SessionModule $modules)
|
||||
public function addModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->modules[] = $modules;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove modules
|
||||
*
|
||||
* @param \Entities\SessionModule $modules
|
||||
*/
|
||||
public function removeModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->modules->removeElement($modules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get modules
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getModules()
|
||||
{
|
||||
@@ -419,27 +454,4 @@ class Session
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add modules
|
||||
*
|
||||
* @param \Entities\SessionModule $modules
|
||||
* @return Session
|
||||
*/
|
||||
public function addModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->modules[] = $modules;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove modules
|
||||
*
|
||||
* @param \Entities\SessionModule $modules
|
||||
*/
|
||||
public function removeModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->modules->removeElement($modules);
|
||||
}
|
||||
}
|
@@ -1,40 +1,48 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
* Entities\SessionModule
|
||||
* SessionModule
|
||||
*/
|
||||
class SessionModule
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $module_id
|
||||
* @var integer
|
||||
*/
|
||||
private $module_id;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\Session
|
||||
* @var \Entities\Session
|
||||
*/
|
||||
private $session;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -54,6 +62,7 @@ class SessionModule
|
||||
public function setModuleId($moduleId)
|
||||
{
|
||||
$this->module_id = $moduleId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -70,19 +79,20 @@ class SessionModule
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return SessionModule
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -92,19 +102,20 @@ class SessionModule
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return SessionModule
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
@@ -114,19 +125,20 @@ class SessionModule
|
||||
/**
|
||||
* Set session
|
||||
*
|
||||
* @param Entities\Session $session
|
||||
* @param \Entities\Session $session
|
||||
* @return SessionModule
|
||||
*/
|
||||
public function setSession(\Entities\Session $session = null)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*
|
||||
* @return Entities\Session
|
||||
* @return \Entities\Session
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
|
@@ -14,36 +14,34 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* StoryWZ
|
||||
*/
|
||||
class StoryWZ
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $sbas_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $sbas_id;
|
||||
private $sbas_id;
|
||||
|
||||
/**
|
||||
* @var integer $record_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $record_id;
|
||||
private $record_id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $usr_id;
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -59,10 +57,13 @@ class StoryWZ
|
||||
* Set sbas_id
|
||||
*
|
||||
* @param integer $sbasId
|
||||
* @return StoryWZ
|
||||
*/
|
||||
public function setSbasId($sbasId)
|
||||
{
|
||||
$this->sbas_id = $sbasId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,10 +80,13 @@ class StoryWZ
|
||||
* Set record_id
|
||||
*
|
||||
* @param integer $recordId
|
||||
* @return StoryWZ
|
||||
*/
|
||||
public function setRecordId($recordId)
|
||||
{
|
||||
$this->record_id = $recordId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,14 +99,28 @@ class StoryWZ
|
||||
return $this->record_id;
|
||||
}
|
||||
|
||||
public function getRecord(Application $app)
|
||||
{
|
||||
return new \record_adapter($app, $this->getSbasId(), $this->getRecordId());
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->setRecordId($record->get_record_id());
|
||||
$this->setSbasId($record->get_sbas_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set usr_id
|
||||
*
|
||||
* @param integer $usrId
|
||||
* @return StoryWZ
|
||||
*/
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,26 +133,6 @@ class StoryWZ
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->setUsrId($user->get_id());
|
||||
@@ -147,14 +145,26 @@ class StoryWZ
|
||||
}
|
||||
}
|
||||
|
||||
public function getRecord(Application $app)
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
* @return StoryWZ
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
return new \record_adapter($app, $this->getSbasId(), $this->getRecordId());
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
$this->setRecordId($record->get_record_id());
|
||||
$this->setSbasId($record->get_sbas_id());
|
||||
return $this->created;
|
||||
}
|
||||
}
|
@@ -3,7 +3,6 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* UsrAuthProvider
|
||||
@@ -25,6 +24,11 @@ class UsrAuthProvider
|
||||
*/
|
||||
private $provider;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $distant_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
@@ -35,12 +39,6 @@ class UsrAuthProvider
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $distant_id;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
@@ -102,6 +100,29 @@ class UsrAuthProvider
|
||||
return $this->provider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set distant_id
|
||||
*
|
||||
* @param string $distantId
|
||||
* @return UsrAuthProvider
|
||||
*/
|
||||
public function setDistantId($distantId)
|
||||
{
|
||||
$this->distant_id = $distantId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get distant_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDistantId()
|
||||
{
|
||||
return $this->distant_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
@@ -147,27 +168,4 @@ class UsrAuthProvider
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set distant_id
|
||||
*
|
||||
* @param string $distantId
|
||||
* @return UsrAuthProvider
|
||||
*/
|
||||
public function setDistantId($distantId)
|
||||
{
|
||||
$this->distant_id = $distantId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get distant_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDistantId()
|
||||
{
|
||||
return $this->distant_id;
|
||||
}
|
||||
}
|
@@ -14,42 +14,43 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* UsrList
|
||||
*/
|
||||
class UsrList
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string $name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\UsrListOwner
|
||||
*/
|
||||
protected $owners;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
protected $entries;
|
||||
private $owners;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $entries;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->owners = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
@@ -70,10 +71,13 @@ class UsrList
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
* @return UsrList
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,17 +93,20 @@ class UsrList
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return UsrList
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -109,17 +116,20 @@ class UsrList
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return UsrList
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
@@ -129,23 +139,69 @@ class UsrList
|
||||
/**
|
||||
* Add owners
|
||||
*
|
||||
* @param Entities\UsrListOwner $owners
|
||||
* @param \Entities\UsrListOwner $owners
|
||||
* @return UsrList
|
||||
*/
|
||||
public function addUsrListOwner(\Entities\UsrListOwner $owners)
|
||||
public function addOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->owners[] = $owners;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove owners
|
||||
*
|
||||
* @param \Entities\UsrListOwner $owners
|
||||
*/
|
||||
public function removeOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->owners->removeElement($owners);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get owners
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getOwners()
|
||||
{
|
||||
return $this->owners;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add entries
|
||||
*
|
||||
* @param \Entities\UsrListEntry $entries
|
||||
* @return UsrList
|
||||
*/
|
||||
public function addEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->entries[] = $entries;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove entries
|
||||
*
|
||||
* @param \Entities\UsrListEntry $entries
|
||||
*/
|
||||
public function removeEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->entries->removeElement($entries);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entries
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getEntries()
|
||||
{
|
||||
return $this->entries;
|
||||
}
|
||||
|
||||
public function hasAccess(\User_Adapter $user, Application $app)
|
||||
{
|
||||
foreach ($this->getOwners() as $owner) {
|
||||
@@ -173,26 +229,6 @@ class UsrList
|
||||
throw new \Exception('This user is not an owner of the list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add entry
|
||||
*
|
||||
* @param Entities\UsrListEntry $entry
|
||||
*/
|
||||
public function addUsrListEntry(\Entities\UsrListEntry $entry)
|
||||
{
|
||||
$this->entries[] = $entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entries
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getEntries()
|
||||
{
|
||||
return $this->entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if one of the entry is related to the given user
|
||||
*
|
||||
@@ -207,50 +243,4 @@ class UsrList
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add owners
|
||||
*
|
||||
* @param \Entities\UsrListOwner $owners
|
||||
* @return UsrList
|
||||
*/
|
||||
public function addOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->owners[] = $owners;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove owners
|
||||
*
|
||||
* @param \Entities\UsrListOwner $owners
|
||||
*/
|
||||
public function removeOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->owners->removeElement($owners);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add entries
|
||||
*
|
||||
* @param \Entities\UsrListEntry $entries
|
||||
* @return UsrList
|
||||
*/
|
||||
public function addEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->entries[] = $entries;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove entries
|
||||
*
|
||||
* @param \Entities\UsrListEntry $entries
|
||||
*/
|
||||
public function removeEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->entries->removeElement($entries);
|
||||
}
|
||||
}
|
@@ -14,36 +14,34 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* UsrListEntry
|
||||
*/
|
||||
class UsrListEntry
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $usr_id;
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\UsrList
|
||||
* @var \Entities\UsrList
|
||||
*/
|
||||
protected $list;
|
||||
private $list;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -59,10 +57,13 @@ class UsrListEntry
|
||||
* Set usr_id
|
||||
*
|
||||
* @param integer $usrId
|
||||
* @return UsrListEntry
|
||||
*/
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,66 +76,6 @@ class UsrListEntry
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set list
|
||||
*
|
||||
* @param Entities\UsrList $list
|
||||
*/
|
||||
public function setList(\Entities\UsrList $list)
|
||||
{
|
||||
$this->list = $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list
|
||||
*
|
||||
* @return Entities\UsrList
|
||||
*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->list;
|
||||
}
|
||||
|
||||
public function getUser(Application $app)
|
||||
{
|
||||
return \User_Adapter::getInstance($this->getUsrId(), $app);
|
||||
@@ -144,4 +85,73 @@ class UsrListEntry
|
||||
{
|
||||
return $this->setUsrId($user->get_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
* @return UsrListEntry
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param \DateTime $updated
|
||||
* @return UsrListEntry
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set list
|
||||
*
|
||||
* @param \Entities\UsrList $list
|
||||
* @return UsrListEntry
|
||||
*/
|
||||
public function setList(\Entities\UsrList $list = null)
|
||||
{
|
||||
$this->list = $list;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list
|
||||
*
|
||||
* @return \Entities\UsrList
|
||||
*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->list;
|
||||
}
|
||||
}
|
@@ -14,9 +14,7 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* UsrListOwner
|
||||
*/
|
||||
class UsrListOwner
|
||||
{
|
||||
@@ -25,34 +23,34 @@ class UsrListOwner
|
||||
const ROLE_ADMIN = 3;
|
||||
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $usr_id;
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var string $role
|
||||
* @var string
|
||||
*/
|
||||
protected $role;
|
||||
private $role;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\UsrList
|
||||
* @var \Entities\UsrList
|
||||
*/
|
||||
protected $list;
|
||||
private $list;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -68,10 +66,13 @@ class UsrListOwner
|
||||
* Set usr_id
|
||||
*
|
||||
* @param integer $usrId
|
||||
* @return UsrListOwner
|
||||
*/
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,10 +85,21 @@ class UsrListOwner
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
return $this->setUsrId($user->get_id());
|
||||
}
|
||||
|
||||
public function getUser(Application $app)
|
||||
{
|
||||
return \User_Adapter::getInstance($this->getUsrId(), $app);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set role
|
||||
*
|
||||
* @param string $role
|
||||
* @return UsrListOwner
|
||||
*/
|
||||
public function setRole($role)
|
||||
{
|
||||
@@ -95,6 +107,8 @@ class UsrListOwner
|
||||
throw new \Exception('Unknown role `' . $role . '`');
|
||||
|
||||
$this->role = $role;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,17 +124,20 @@ class UsrListOwner
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
* @param \DateTime $created
|
||||
* @return UsrListOwner
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
@@ -130,17 +147,20 @@ class UsrListOwner
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return UsrListOwner
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
@@ -150,30 +170,23 @@ class UsrListOwner
|
||||
/**
|
||||
* Set list
|
||||
*
|
||||
* @param Entities\UsrList $list
|
||||
* @param \Entities\UsrList $list
|
||||
* @return UsrListOwner
|
||||
*/
|
||||
public function setList(\Entities\UsrList $list)
|
||||
public function setList(\Entities\UsrList $list = null)
|
||||
{
|
||||
$this->list = $list;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list
|
||||
*
|
||||
* @return Entities\UsrList
|
||||
* @return \Entities\UsrList
|
||||
*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->list;
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
return $this->setUsrId($user->get_id());
|
||||
}
|
||||
|
||||
public function getUser(Application $app)
|
||||
{
|
||||
return \User_Adapter::getInstance($this->getUsrId(), $app);
|
||||
}
|
||||
}
|
@@ -11,42 +11,42 @@
|
||||
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* ValidationData
|
||||
*/
|
||||
class ValidationData
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var boolean $agreement
|
||||
* @var boolean
|
||||
*/
|
||||
protected $agreement;
|
||||
private $agreement;
|
||||
|
||||
/**
|
||||
* @var text $note
|
||||
* @var string
|
||||
*/
|
||||
protected $note;
|
||||
private $note;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $updated;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Entities\ValidationParticipant
|
||||
* @var \Entities\ValidationParticipant
|
||||
*/
|
||||
protected $participant;
|
||||
private $participant;
|
||||
|
||||
/**
|
||||
* @var Entities\BasketElement
|
||||
* @var \Entities\BasketElement
|
||||
*/
|
||||
protected $basket_element;
|
||||
private $basket_element;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -62,10 +62,13 @@ class ValidationData
|
||||
* Set agreement
|
||||
*
|
||||
* @param boolean $agreement
|
||||
* @return ValidationData
|
||||
*/
|
||||
public function setAgreement($agreement)
|
||||
{
|
||||
$this->agreement = $agreement;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,17 +84,20 @@ class ValidationData
|
||||
/**
|
||||
* Set note
|
||||
*
|
||||
* @param text $note
|
||||
* @param string $note
|
||||
* @return ValidationData
|
||||
*/
|
||||
public function setNote($note)
|
||||
{
|
||||
$this->note = $note;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get note
|
||||
*
|
||||
* @return text
|
||||
* @return string
|
||||
*/
|
||||
public function getNote()
|
||||
{
|
||||
@@ -101,17 +107,20 @@ class ValidationData
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
* @param \DateTime $updated
|
||||
* @return ValidationData
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
@@ -121,17 +130,20 @@ class ValidationData
|
||||
/**
|
||||
* Set participant
|
||||
*
|
||||
* @param Entities\ValidationParticipant $participant
|
||||
* @param \Entities\ValidationParticipant $participant
|
||||
* @return ValidationData
|
||||
*/
|
||||
public function setParticipant(\Entities\ValidationParticipant $participant)
|
||||
public function setParticipant(\Entities\ValidationParticipant $participant = null)
|
||||
{
|
||||
$this->participant = $participant;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get participant
|
||||
*
|
||||
* @return Entities\ValidationParticipant
|
||||
* @return \Entities\ValidationParticipant
|
||||
*/
|
||||
public function getParticipant()
|
||||
{
|
||||
@@ -141,17 +153,20 @@ class ValidationData
|
||||
/**
|
||||
* Set basket_element
|
||||
*
|
||||
* @param Entities\BasketElement $basketElement
|
||||
* @param \Entities\BasketElement $basketElement
|
||||
* @return ValidationData
|
||||
*/
|
||||
public function setBasketElement(\Entities\BasketElement $basketElement)
|
||||
public function setBasketElement(\Entities\BasketElement $basketElement = null)
|
||||
{
|
||||
$this->basket_element = $basketElement;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basket_element
|
||||
*
|
||||
* @return Entities\BasketElement
|
||||
* @return \Entities\BasketElement
|
||||
*/
|
||||
public function getBasketElement()
|
||||
{
|
||||
|
@@ -14,57 +14,58 @@ namespace Entities;
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
/**
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* ValidationParticipant
|
||||
*/
|
||||
class ValidationParticipant
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer $usr_id
|
||||
* @var integer
|
||||
*/
|
||||
protected $usr_id;
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var Entities\ValidationSession
|
||||
* @var boolean
|
||||
*/
|
||||
protected $session;
|
||||
private $is_aware = false;
|
||||
|
||||
/**
|
||||
* @var datetime $reminded
|
||||
* @var boolean
|
||||
*/
|
||||
protected $reminded = null;
|
||||
private $is_confirmed = false;
|
||||
|
||||
/**
|
||||
* @var Entities\ValidationData
|
||||
* @var boolean
|
||||
*/
|
||||
protected $datas;
|
||||
private $can_agree = false;
|
||||
|
||||
/**
|
||||
* @var boolean $is_confirmed
|
||||
* @var boolean
|
||||
*/
|
||||
protected $is_confirmed = false;
|
||||
private $can_see_others = false;
|
||||
|
||||
/**
|
||||
* @var boolean $can_agree
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $can_agree = false;
|
||||
private $reminded;
|
||||
|
||||
/**
|
||||
* @var boolean $can_see_others
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
protected $can_see_others = false;
|
||||
private $datas;
|
||||
|
||||
/**
|
||||
* @var boolean $is_aware
|
||||
* @var \Entities\ValidationSession
|
||||
*/
|
||||
protected $is_aware = false;
|
||||
private $session;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->datas = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
@@ -84,10 +85,13 @@ class ValidationParticipant
|
||||
* Set usr_id
|
||||
*
|
||||
* @param integer $usrId
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->usr_id = $usrId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,56 +104,6 @@ class ValidationParticipant
|
||||
return $this->usr_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add datases
|
||||
*
|
||||
* @param Entities\ValidationData $datas
|
||||
*/
|
||||
public function addValidationData(\Entities\ValidationData $datas)
|
||||
{
|
||||
$this->datas[] = $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set session
|
||||
*
|
||||
* @param Entities\ValidationSession $session
|
||||
*/
|
||||
public function setSession(\Entities\ValidationSession $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*
|
||||
* @return Entities\ValidationSession
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
return $this->session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set is_aware
|
||||
*
|
||||
* @param boolean $isAware
|
||||
*/
|
||||
public function setIsAware($isAware)
|
||||
{
|
||||
$this->is_aware = $isAware;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get is_aware
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsAware()
|
||||
{
|
||||
return $this->is_aware;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param \User_Adapter $user
|
||||
@@ -168,43 +122,39 @@ class ValidationParticipant
|
||||
}
|
||||
|
||||
/**
|
||||
* Set reminded
|
||||
* Set is_aware
|
||||
*
|
||||
* @param datetime $reminded
|
||||
* @param boolean $isAware
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setReminded($reminded)
|
||||
public function setIsAware($isAware)
|
||||
{
|
||||
$this->reminded = $reminded;
|
||||
$this->is_aware = $isAware;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get reminded
|
||||
* Get is_aware
|
||||
*
|
||||
* @return datetime
|
||||
* @return boolean
|
||||
*/
|
||||
public function getReminded()
|
||||
public function getIsAware()
|
||||
{
|
||||
return $this->reminded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get datas
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getDatas()
|
||||
{
|
||||
return $this->datas;
|
||||
return $this->is_aware;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set is_confirmed
|
||||
*
|
||||
* @param boolean $isConfirmed
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setIsConfirmed($isConfirmed)
|
||||
{
|
||||
$this->is_confirmed = $isConfirmed;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,10 +171,13 @@ class ValidationParticipant
|
||||
* Set can_agree
|
||||
*
|
||||
* @param boolean $canAgree
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setCanAgree($canAgree)
|
||||
{
|
||||
$this->can_agree = $canAgree;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,10 +194,13 @@ class ValidationParticipant
|
||||
* Set can_see_others
|
||||
*
|
||||
* @param boolean $canSeeOthers
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setCanSeeOthers($canSeeOthers)
|
||||
{
|
||||
$this->can_see_others = $canSeeOthers;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,21 +213,27 @@ class ValidationParticipant
|
||||
return $this->can_see_others;
|
||||
}
|
||||
|
||||
public function isReleasable()
|
||||
/**
|
||||
* Set reminded
|
||||
*
|
||||
* @param \DateTime $reminded
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setReminded($reminded)
|
||||
{
|
||||
$this->reminded = $reminded;
|
||||
|
||||
if ($this->getIsConfirmed()) {
|
||||
return false;
|
||||
return $this;
|
||||
}
|
||||
|
||||
foreach ($this->getDatas() as $validation_data) {
|
||||
/* @var $validation_data \Entities\ValidationData */
|
||||
if ($validation_data->getAgreement() === null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
/**
|
||||
* Get reminded
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getReminded()
|
||||
{
|
||||
return $this->reminded;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,4 +258,54 @@ class ValidationParticipant
|
||||
{
|
||||
$this->datas->removeElement($datas);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get datas
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getDatas()
|
||||
{
|
||||
return $this->datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set session
|
||||
*
|
||||
* @param \Entities\ValidationSession $session
|
||||
* @return ValidationParticipant
|
||||
*/
|
||||
public function setSession(\Entities\ValidationSession $session = null)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*
|
||||
* @return \Entities\ValidationSession
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
return $this->session;
|
||||
}
|
||||
|
||||
public function isReleasable()
|
||||
{
|
||||
|
||||
if ($this->getIsConfirmed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->getDatas() as $validation_data) {
|
||||
/* @var $validation_data \Entities\ValidationData */
|
||||
if ($validation_data->getAgreement() === null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -15,63 +15,48 @@ use Alchemy\Phrasea\Application;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Kernel
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
* ValidationSession
|
||||
*/
|
||||
class ValidationSession
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
* @var integer
|
||||
*/
|
||||
protected $id;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string $name
|
||||
* @var integer
|
||||
*/
|
||||
protected $name;
|
||||
private $initiator_id;
|
||||
|
||||
/**
|
||||
* @var text $description
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $description;
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var boolean $archived
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $archived;
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var datetime $created
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $created;
|
||||
private $expires;
|
||||
|
||||
/**
|
||||
* @var datetime $updated
|
||||
* @var \Entities\Basket
|
||||
*/
|
||||
protected $updated;
|
||||
private $basket;
|
||||
|
||||
/**
|
||||
* @var datetime $expires
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
protected $expires;
|
||||
private $participants;
|
||||
|
||||
/**
|
||||
* @var datetime $reminded
|
||||
* Constructor
|
||||
*/
|
||||
protected $reminded;
|
||||
|
||||
/**
|
||||
* @var Entities\Basket
|
||||
*/
|
||||
protected $basket;
|
||||
|
||||
/**
|
||||
* @var Entities\ValidationParticipant
|
||||
*/
|
||||
protected $participants;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->participants = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
@@ -87,219 +72,17 @@ class ValidationSession
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param text $description
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description
|
||||
*
|
||||
* @return text
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set archived
|
||||
*
|
||||
* @param boolean $archived
|
||||
*/
|
||||
public function setArchived($archived)
|
||||
{
|
||||
$this->archived = $archived;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get archived
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getArchived()
|
||||
{
|
||||
return $this->archived;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param datetime $created
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param datetime $updated
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set expires
|
||||
*
|
||||
* @param datetime $expires
|
||||
*/
|
||||
public function setExpires($expires)
|
||||
{
|
||||
$this->expires = $expires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get expires
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
return $this->expires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set reminded
|
||||
*
|
||||
* @param datetime $reminded
|
||||
*/
|
||||
public function setReminded($reminded)
|
||||
{
|
||||
$this->reminded = $reminded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get reminded
|
||||
*
|
||||
* @return datetime
|
||||
*/
|
||||
public function getReminded()
|
||||
{
|
||||
return $this->reminded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set basket
|
||||
*
|
||||
* @param Entities\Basket $basket
|
||||
*/
|
||||
public function setBasket(\Entities\Basket $basket)
|
||||
{
|
||||
$this->basket = $basket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basket
|
||||
*
|
||||
* @return Entities\Basket
|
||||
*/
|
||||
public function getBasket()
|
||||
{
|
||||
return $this->basket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add participants
|
||||
*
|
||||
* @param Entities\ValidationParticipant $participants
|
||||
*/
|
||||
public function addValidationParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->participants[] = $participants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get participants
|
||||
*
|
||||
* @return Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getParticipants()
|
||||
{
|
||||
return $this->participants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a participant
|
||||
*
|
||||
* @return Entities\ValidationParticipant
|
||||
*/
|
||||
public function getParticipant(\User_Adapter $user, Application $app)
|
||||
{
|
||||
foreach ($this->getParticipants() as $participant) {
|
||||
if ($participant->getUser($app)->get_id() == $user->get_id()) {
|
||||
return $participant;
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException('Particpant not found' . $user->get_email());
|
||||
}
|
||||
/**
|
||||
* @var integer $initiator
|
||||
*/
|
||||
protected $initiator;
|
||||
|
||||
/**
|
||||
* @var integer $initiator_id
|
||||
*/
|
||||
protected $initiator_id;
|
||||
|
||||
/**
|
||||
* Set initiator_id
|
||||
*
|
||||
* @param integer $initiatorId
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function setInitiatorId($initiatorId)
|
||||
{
|
||||
$this->initiator_id = $initiatorId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -331,6 +114,131 @@ class ValidationSession
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param \DateTime $updated
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set expires
|
||||
*
|
||||
* @param \DateTime $expires
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function setExpires($expires)
|
||||
{
|
||||
$this->expires = $expires;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get expires
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
return $this->expires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set basket
|
||||
*
|
||||
* @param \Entities\Basket $basket
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function setBasket(\Entities\Basket $basket = null)
|
||||
{
|
||||
$this->basket = $basket;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basket
|
||||
*
|
||||
* @return \Entities\Basket
|
||||
*/
|
||||
public function getBasket()
|
||||
{
|
||||
return $this->basket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add participants
|
||||
*
|
||||
* @param \Entities\ValidationParticipant $participants
|
||||
* @return ValidationSession
|
||||
*/
|
||||
public function addParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->participants[] = $participants;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove participants
|
||||
*
|
||||
* @param \Entities\ValidationParticipant $participants
|
||||
*/
|
||||
public function removeParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->participants->removeElement($participants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get participants
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getParticipants()
|
||||
{
|
||||
return $this->participants;
|
||||
}
|
||||
|
||||
public function isFinished()
|
||||
{
|
||||
if (is_null($this->getExpires())) {
|
||||
@@ -373,25 +281,18 @@ class ValidationSession
|
||||
}
|
||||
|
||||
/**
|
||||
* Add participants
|
||||
* Get a participant
|
||||
*
|
||||
* @param \Entities\ValidationParticipant $participants
|
||||
* @return ValidationSession
|
||||
* @return Entities\ValidationParticipant
|
||||
*/
|
||||
public function addParticipant(\Entities\ValidationParticipant $participants)
|
||||
public function getParticipant(\User_Adapter $user, Application $app)
|
||||
{
|
||||
$this->participants[] = $participants;
|
||||
|
||||
return $this;
|
||||
foreach ($this->getParticipants() as $participant) {
|
||||
if ($participant->getUser($app)->get_id() == $user->get_id()) {
|
||||
return $participant;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove participants
|
||||
*
|
||||
* @param \Entities\ValidationParticipant $participants
|
||||
*/
|
||||
public function removeParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->participants->removeElement($participants);
|
||||
throw new NotFoundHttpException('Particpant not found' . $user->get_email());
|
||||
}
|
||||
}
|
124
lib/Doctrine/Proxies/__CG__EntitiesAuthFailure.php
Normal file
124
lib/Doctrine/Proxies/__CG__EntitiesAuthFailure.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace Proxies\__CG__\Entities;
|
||||
|
||||
/**
|
||||
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
|
||||
*/
|
||||
class AuthFailure extends \Entities\AuthFailure implements \Doctrine\ORM\Proxy\Proxy
|
||||
{
|
||||
private $_entityPersister;
|
||||
private $_identifier;
|
||||
public $__isInitialized__ = false;
|
||||
public function __construct($entityPersister, $identifier)
|
||||
{
|
||||
$this->_entityPersister = $entityPersister;
|
||||
$this->_identifier = $identifier;
|
||||
}
|
||||
/** @private */
|
||||
public function __load()
|
||||
{
|
||||
if (!$this->__isInitialized__ && $this->_entityPersister) {
|
||||
$this->__isInitialized__ = true;
|
||||
|
||||
if (method_exists($this, "__wakeup")) {
|
||||
// call this after __isInitialized__to avoid infinite recursion
|
||||
// but before loading to emulate what ClassMetadata::newInstance()
|
||||
// provides.
|
||||
$this->__wakeup();
|
||||
}
|
||||
|
||||
if ($this->_entityPersister->load($this->_identifier, $this) === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
}
|
||||
}
|
||||
|
||||
/** @private */
|
||||
public function __isInitialized()
|
||||
{
|
||||
return $this->__isInitialized__;
|
||||
}
|
||||
|
||||
|
||||
public function getId()
|
||||
{
|
||||
if ($this->__isInitialized__ === false) {
|
||||
return (int) $this->_identifier["id"];
|
||||
}
|
||||
$this->__load();
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
public function setUsername($username)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUsername($username);
|
||||
}
|
||||
|
||||
public function getUsername()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUsername();
|
||||
}
|
||||
|
||||
public function setIp($ip)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setIp($ip);
|
||||
}
|
||||
|
||||
public function getIp()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getIp();
|
||||
}
|
||||
|
||||
public function setLocked($locked)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setLocked($locked);
|
||||
}
|
||||
|
||||
public function getLocked()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getLocked();
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setCreated($created);
|
||||
}
|
||||
|
||||
public function getCreated()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getCreated();
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
return array('__isInitialized__', 'id', 'username', 'ip', 'locked', 'created');
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
if (!$this->__isInitialized__ && $this->_entityPersister) {
|
||||
$this->__isInitialized__ = true;
|
||||
$class = $this->_entityPersister->getClassMetadata();
|
||||
$original = $this->_entityPersister->load($this->_identifier);
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -87,6 +87,30 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function setOwner(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setOwner($user);
|
||||
}
|
||||
|
||||
public function getOwner(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getOwner($app);
|
||||
}
|
||||
|
||||
public function setIsRead($isRead)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setIsRead($isRead);
|
||||
}
|
||||
|
||||
public function getIsRead()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getIsRead();
|
||||
}
|
||||
|
||||
public function setPusherId($pusherId)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -99,6 +123,18 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getPusherId();
|
||||
}
|
||||
|
||||
public function setPusher(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setPusher($user);
|
||||
}
|
||||
|
||||
public function getPusher(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getPusher($app);
|
||||
}
|
||||
|
||||
public function setArchived($archived)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -135,10 +171,28 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function addBasketElement(\Entities\BasketElement $elements)
|
||||
public function setValidation(\Entities\ValidationSession $validation = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addBasketElement($elements);
|
||||
return parent::setValidation($validation);
|
||||
}
|
||||
|
||||
public function getValidation()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getValidation();
|
||||
}
|
||||
|
||||
public function addElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addElement($elements);
|
||||
}
|
||||
|
||||
public function removeElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeElement($elements);
|
||||
}
|
||||
|
||||
public function getElements()
|
||||
@@ -153,54 +207,6 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getElementsByOrder($ordre);
|
||||
}
|
||||
|
||||
public function setPusher(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setPusher($user);
|
||||
}
|
||||
|
||||
public function getPusher(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getPusher($app);
|
||||
}
|
||||
|
||||
public function setOwner(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setOwner($user);
|
||||
}
|
||||
|
||||
public function getOwner(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getOwner($app);
|
||||
}
|
||||
|
||||
public function setValidation(\Entities\ValidationSession $validation)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setValidation($validation);
|
||||
}
|
||||
|
||||
public function getValidation()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getValidation();
|
||||
}
|
||||
|
||||
public function setIsRead($isRead)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setIsRead($isRead);
|
||||
}
|
||||
|
||||
public function getIsRead()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getIsRead();
|
||||
}
|
||||
|
||||
public function hasRecord(\Alchemy\Phrasea\Application $app, \record_adapter $record)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -213,18 +219,6 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getSize($app);
|
||||
}
|
||||
|
||||
public function addElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addElement($elements);
|
||||
}
|
||||
|
||||
public function removeElement(\Entities\BasketElement $elements)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeElement($elements);
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
|
@@ -75,6 +75,18 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro
|
||||
return parent::getSbasId();
|
||||
}
|
||||
|
||||
public function getRecord(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getRecord($app);
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setRecord($record);
|
||||
}
|
||||
|
||||
public function setOrd($ord)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -111,7 +123,25 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setBasket(\Entities\Basket $basket)
|
||||
public function addValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addValidationData($validationDatas);
|
||||
}
|
||||
|
||||
public function removeValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeValidationData($validationDatas);
|
||||
}
|
||||
|
||||
public function getValidationDatas()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getValidationDatas();
|
||||
}
|
||||
|
||||
public function setBasket(\Entities\Basket $basket = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setBasket($basket);
|
||||
@@ -123,36 +153,12 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro
|
||||
return parent::getBasket();
|
||||
}
|
||||
|
||||
public function getRecord(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getRecord($app);
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setRecord($record);
|
||||
}
|
||||
|
||||
public function setLastInBasket()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setLastInBasket();
|
||||
}
|
||||
|
||||
public function addValidationData(\Entities\ValidationData $validationDatas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addValidationData($validationDatas);
|
||||
}
|
||||
|
||||
public function getValidationDatas()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getValidationDatas();
|
||||
}
|
||||
|
||||
public function getUserValidationDatas(\User_Adapter $user, \Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -174,7 +180,7 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -126,7 +126,7 @@ class LazaretAttribute extends \Entities\LazaretAttribute implements \Doctrine\O
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -51,18 +51,6 @@ class LazaretCheck extends \Entities\LazaretCheck implements \Doctrine\ORM\Proxy
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
public function setLazaretFile(\Entities\LazaretFile $lazaretFile = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setLazaretFile($lazaretFile);
|
||||
}
|
||||
|
||||
public function getLazaretFile()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getLazaretFile();
|
||||
}
|
||||
|
||||
public function setCheckClassname($checkClassname)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -75,6 +63,18 @@ class LazaretCheck extends \Entities\LazaretCheck implements \Doctrine\ORM\Proxy
|
||||
return parent::getCheckClassname();
|
||||
}
|
||||
|
||||
public function setLazaretFile(\Entities\LazaretFile $lazaretFile = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setLazaretFile($lazaretFile);
|
||||
}
|
||||
|
||||
public function getLazaretFile()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getLazaretFile();
|
||||
}
|
||||
|
||||
public function getMessage()
|
||||
{
|
||||
$this->__load();
|
||||
@@ -96,7 +96,7 @@ class LazaretCheck extends \Entities\LazaretCheck implements \Doctrine\ORM\Proxy
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -51,6 +51,42 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
public function setFilename($filename)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setFilename($filename);
|
||||
}
|
||||
|
||||
public function getFilename()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getFilename();
|
||||
}
|
||||
|
||||
public function setThumbFilename($thumbFilename)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setThumbFilename($thumbFilename);
|
||||
}
|
||||
|
||||
public function getThumbFilename()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getThumbFilename();
|
||||
}
|
||||
|
||||
public function setOriginalName($originalName)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setOriginalName($originalName);
|
||||
}
|
||||
|
||||
public function getOriginalName()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getOriginalName();
|
||||
}
|
||||
|
||||
public function setBaseId($baseId)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -63,6 +99,12 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getBaseId();
|
||||
}
|
||||
|
||||
public function getCollection(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getCollection($app);
|
||||
}
|
||||
|
||||
public function setUuid($uuid)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -87,6 +129,18 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getSha256();
|
||||
}
|
||||
|
||||
public function setForced($forced)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setForced($forced);
|
||||
}
|
||||
|
||||
public function getForced()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getForced();
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -111,10 +165,16 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function addLazaretAttribute(\Entities\LazaretAttribute $attributes)
|
||||
public function addAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addLazaretAttribute($attributes);
|
||||
return parent::addAttribute($attributes);
|
||||
}
|
||||
|
||||
public function removeAttribute(\Entities\LazaretAttribute $attributes)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeAttribute($attributes);
|
||||
}
|
||||
|
||||
public function getAttributes()
|
||||
@@ -123,6 +183,24 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getAttributes();
|
||||
}
|
||||
|
||||
public function addCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addCheck($checks);
|
||||
}
|
||||
|
||||
public function removeCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeCheck($checks);
|
||||
}
|
||||
|
||||
public function getChecks()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getChecks();
|
||||
}
|
||||
|
||||
public function setSession(\Entities\LazaretSession $session = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -135,78 +213,12 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
return parent::getSession();
|
||||
}
|
||||
|
||||
public function setOriginalName($originalName)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setOriginalName($originalName);
|
||||
}
|
||||
|
||||
public function getOriginalName()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getOriginalName();
|
||||
}
|
||||
|
||||
public function addLazaretCheck(\Entities\LazaretCheck $checks)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addLazaretCheck($checks);
|
||||
}
|
||||
|
||||
public function getChecks()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getChecks();
|
||||
}
|
||||
|
||||
public function setForced($forced)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setForced($forced);
|
||||
}
|
||||
|
||||
public function getForced()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getForced();
|
||||
}
|
||||
|
||||
public function getCollection(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getCollection($app);
|
||||
}
|
||||
|
||||
public function getRecordsToSubstitute(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getRecordsToSubstitute($app);
|
||||
}
|
||||
|
||||
public function setFilename($filename)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setFilename($filename);
|
||||
}
|
||||
|
||||
public function getFilename()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getFilename();
|
||||
}
|
||||
|
||||
public function setThumbFilename($thumbFilename)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setThumbFilename($thumbFilename);
|
||||
}
|
||||
|
||||
public function getThumbFilename()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getThumbFilename();
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
@@ -222,7 +234,7 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -57,6 +57,12 @@ class LazaretSession extends \Entities\LazaretSession implements \Doctrine\ORM\P
|
||||
return parent::setUsrId($usrId);
|
||||
}
|
||||
|
||||
public function getUsrId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -87,30 +93,6 @@ class LazaretSession extends \Entities\LazaretSession implements \Doctrine\ORM\P
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function addLazaretFiles(\Entities\LazaretFile $files)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addLazaretFiles($files);
|
||||
}
|
||||
|
||||
public function getFiles()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getFiles();
|
||||
}
|
||||
|
||||
public function addLazaretFile(\Entities\LazaretFile $files)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addLazaretFile($files);
|
||||
}
|
||||
|
||||
public function getUsrId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function addFile(\Entities\LazaretFile $files)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -123,6 +105,12 @@ class LazaretSession extends \Entities\LazaretSession implements \Doctrine\ORM\P
|
||||
return parent::removeFile($files);
|
||||
}
|
||||
|
||||
public function getFiles()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getFiles();
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
|
@@ -207,10 +207,16 @@ class Session extends \Entities\Session implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function addSessionModule(\Entities\SessionModule $modules)
|
||||
public function addModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addSessionModule($modules);
|
||||
return parent::addModule($modules);
|
||||
}
|
||||
|
||||
public function removeModule(\Entities\SessionModule $modules)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeModule($modules);
|
||||
}
|
||||
|
||||
public function getModules()
|
||||
@@ -219,6 +225,12 @@ class Session extends \Entities\Session implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getModules();
|
||||
}
|
||||
|
||||
public function getModuleById($moduleId)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getModuleById($moduleId);
|
||||
}
|
||||
|
||||
public function hasModuleId($moduleId)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -240,7 +252,7 @@ class Session extends \Entities\Session implements \Doctrine\ORM\Proxy\Proxy
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -75,18 +75,6 @@ class SessionModule extends \Entities\SessionModule implements \Doctrine\ORM\Pro
|
||||
return parent::getCreated();
|
||||
}
|
||||
|
||||
public function setSession(\Entities\Session $session = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setSession($session);
|
||||
}
|
||||
|
||||
public function getSession()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getSession();
|
||||
}
|
||||
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -99,6 +87,18 @@ class SessionModule extends \Entities\SessionModule implements \Doctrine\ORM\Pro
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setSession(\Entities\Session $session = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setSession($session);
|
||||
}
|
||||
|
||||
public function getSession()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getSession();
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
@@ -114,7 +114,7 @@ class SessionModule extends \Entities\SessionModule implements \Doctrine\ORM\Pro
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -75,6 +75,18 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getRecordId();
|
||||
}
|
||||
|
||||
public function getRecord(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getRecord($app);
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setRecord($record);
|
||||
}
|
||||
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -87,18 +99,6 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setCreated($created);
|
||||
}
|
||||
|
||||
public function getCreated()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getCreated();
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -111,16 +111,16 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function getRecord(\Alchemy\Phrasea\Application $app)
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getRecord($app);
|
||||
return parent::setCreated($created);
|
||||
}
|
||||
|
||||
public function setRecord(\record_adapter $record)
|
||||
public function getCreated()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setRecord($record);
|
||||
return parent::getCreated();
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
142
lib/Doctrine/Proxies/__CG__EntitiesUsrAuthProvider.php
Normal file
142
lib/Doctrine/Proxies/__CG__EntitiesUsrAuthProvider.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
namespace Proxies\__CG__\Entities;
|
||||
|
||||
/**
|
||||
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
|
||||
*/
|
||||
class UsrAuthProvider extends \Entities\UsrAuthProvider implements \Doctrine\ORM\Proxy\Proxy
|
||||
{
|
||||
private $_entityPersister;
|
||||
private $_identifier;
|
||||
public $__isInitialized__ = false;
|
||||
public function __construct($entityPersister, $identifier)
|
||||
{
|
||||
$this->_entityPersister = $entityPersister;
|
||||
$this->_identifier = $identifier;
|
||||
}
|
||||
/** @private */
|
||||
public function __load()
|
||||
{
|
||||
if (!$this->__isInitialized__ && $this->_entityPersister) {
|
||||
$this->__isInitialized__ = true;
|
||||
|
||||
if (method_exists($this, "__wakeup")) {
|
||||
// call this after __isInitialized__to avoid infinite recursion
|
||||
// but before loading to emulate what ClassMetadata::newInstance()
|
||||
// provides.
|
||||
$this->__wakeup();
|
||||
}
|
||||
|
||||
if ($this->_entityPersister->load($this->_identifier, $this) === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
}
|
||||
}
|
||||
|
||||
/** @private */
|
||||
public function __isInitialized()
|
||||
{
|
||||
return $this->__isInitialized__;
|
||||
}
|
||||
|
||||
|
||||
public function getId()
|
||||
{
|
||||
if ($this->__isInitialized__ === false) {
|
||||
return (int) $this->_identifier["id"];
|
||||
}
|
||||
$this->__load();
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
public function setUsrId($usrId)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUsrId($usrId);
|
||||
}
|
||||
|
||||
public function getUsrId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function setProvider($provider)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setProvider($provider);
|
||||
}
|
||||
|
||||
public function getProvider()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getProvider();
|
||||
}
|
||||
|
||||
public function setDistantId($distantId)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setDistantId($distantId);
|
||||
}
|
||||
|
||||
public function getDistantId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getDistantId();
|
||||
}
|
||||
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUpdated($updated);
|
||||
}
|
||||
|
||||
public function getUpdated()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setCreated($created);
|
||||
}
|
||||
|
||||
public function getCreated()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getCreated();
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
return array('__isInitialized__', 'id', 'usr_id', 'provider', 'distant_id', 'updated', 'created');
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
if (!$this->__isInitialized__ && $this->_entityPersister) {
|
||||
$this->__isInitialized__ = true;
|
||||
$class = $this->_entityPersister->getClassMetadata();
|
||||
$original = $this->_entityPersister->load($this->_identifier);
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -87,10 +87,16 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function addUsrListOwner(\Entities\UsrListOwner $owners)
|
||||
public function addOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addUsrListOwner($owners);
|
||||
return parent::addOwner($owners);
|
||||
}
|
||||
|
||||
public function removeOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeOwner($owners);
|
||||
}
|
||||
|
||||
public function getOwners()
|
||||
@@ -99,6 +105,24 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getOwners();
|
||||
}
|
||||
|
||||
public function addEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addEntrie($entries);
|
||||
}
|
||||
|
||||
public function removeEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeEntrie($entries);
|
||||
}
|
||||
|
||||
public function getEntries()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getEntries();
|
||||
}
|
||||
|
||||
public function hasAccess(\User_Adapter $user, \Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -111,48 +135,12 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy
|
||||
return parent::getOwner($user, $app);
|
||||
}
|
||||
|
||||
public function addUsrListEntry(\Entities\UsrListEntry $entry)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addUsrListEntry($entry);
|
||||
}
|
||||
|
||||
public function getEntries()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getEntries();
|
||||
}
|
||||
|
||||
public function has(\User_Adapter $user, \Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::has($user, $app);
|
||||
}
|
||||
|
||||
public function addOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addOwner($owners);
|
||||
}
|
||||
|
||||
public function removeOwner(\Entities\UsrListOwner $owners)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeOwner($owners);
|
||||
}
|
||||
|
||||
public function addEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addEntrie($entries);
|
||||
}
|
||||
|
||||
public function removeEntrie(\Entities\UsrListEntry $entries)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeEntrie($entries);
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
|
@@ -63,6 +63,18 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUser($user);
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -87,7 +99,7 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setList(\Entities\UsrList $list)
|
||||
public function setList(\Entities\UsrList $list = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setList($list);
|
||||
@@ -99,18 +111,6 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy
|
||||
return parent::getList();
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUser($user);
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
@@ -126,7 +126,7 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -63,6 +63,18 @@ class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUser($user);
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function setRole($role)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -99,7 +111,7 @@ class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setList(\Entities\UsrList $list)
|
||||
public function setList(\Entities\UsrList $list = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setList($list);
|
||||
@@ -111,18 +123,6 @@ class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy
|
||||
return parent::getList();
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setUser($user);
|
||||
}
|
||||
|
||||
public function getUser(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
|
@@ -87,7 +87,7 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P
|
||||
return parent::getUpdated();
|
||||
}
|
||||
|
||||
public function setParticipant(\Entities\ValidationParticipant $participant)
|
||||
public function setParticipant(\Entities\ValidationParticipant $participant = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setParticipant($participant);
|
||||
@@ -99,7 +99,7 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P
|
||||
return parent::getParticipant();
|
||||
}
|
||||
|
||||
public function setBasketElement(\Entities\BasketElement $basketElement)
|
||||
public function setBasketElement(\Entities\BasketElement $basketElement = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setBasketElement($basketElement);
|
||||
@@ -126,7 +126,7 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -63,36 +63,6 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \
|
||||
return parent::getUsrId();
|
||||
}
|
||||
|
||||
public function addValidationData(\Entities\ValidationData $datas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addValidationData($datas);
|
||||
}
|
||||
|
||||
public function setSession(\Entities\ValidationSession $session)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setSession($session);
|
||||
}
|
||||
|
||||
public function getSession()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getSession();
|
||||
}
|
||||
|
||||
public function setIsAware($isAware)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setIsAware($isAware);
|
||||
}
|
||||
|
||||
public function getIsAware()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getIsAware();
|
||||
}
|
||||
|
||||
public function setUser(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
@@ -105,22 +75,16 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \
|
||||
return parent::getUser($app);
|
||||
}
|
||||
|
||||
public function setReminded($reminded)
|
||||
public function setIsAware($isAware)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setReminded($reminded);
|
||||
return parent::setIsAware($isAware);
|
||||
}
|
||||
|
||||
public function getReminded()
|
||||
public function getIsAware()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getReminded();
|
||||
}
|
||||
|
||||
public function getDatas()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getDatas();
|
||||
return parent::getIsAware();
|
||||
}
|
||||
|
||||
public function setIsConfirmed($isConfirmed)
|
||||
@@ -159,6 +123,48 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \
|
||||
return parent::getCanSeeOthers();
|
||||
}
|
||||
|
||||
public function setReminded($reminded)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setReminded($reminded);
|
||||
}
|
||||
|
||||
public function getReminded()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getReminded();
|
||||
}
|
||||
|
||||
public function addData(\Entities\ValidationData $datas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addData($datas);
|
||||
}
|
||||
|
||||
public function removeData(\Entities\ValidationData $datas)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeData($datas);
|
||||
}
|
||||
|
||||
public function getDatas()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getDatas();
|
||||
}
|
||||
|
||||
public function setSession(\Entities\ValidationSession $session = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setSession($session);
|
||||
}
|
||||
|
||||
public function getSession()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getSession();
|
||||
}
|
||||
|
||||
public function isReleasable()
|
||||
{
|
||||
$this->__load();
|
||||
@@ -180,7 +186,7 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -51,40 +51,34 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
public function setInitiatorId($initiatorId)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setName($name);
|
||||
return parent::setInitiatorId($initiatorId);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
public function getInitiatorId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getName();
|
||||
return parent::getInitiatorId();
|
||||
}
|
||||
|
||||
public function setDescription($description)
|
||||
public function isInitiator(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setDescription($description);
|
||||
return parent::isInitiator($user);
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
public function setInitiator(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getDescription();
|
||||
return parent::setInitiator($user);
|
||||
}
|
||||
|
||||
public function setArchived($archived)
|
||||
public function getInitiator(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setArchived($archived);
|
||||
}
|
||||
|
||||
public function getArchived()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getArchived();
|
||||
return parent::getInitiator($app);
|
||||
}
|
||||
|
||||
public function setCreated($created)
|
||||
@@ -123,19 +117,7 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
return parent::getExpires();
|
||||
}
|
||||
|
||||
public function setReminded($reminded)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setReminded($reminded);
|
||||
}
|
||||
|
||||
public function getReminded()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getReminded();
|
||||
}
|
||||
|
||||
public function setBasket(\Entities\Basket $basket)
|
||||
public function setBasket(\Entities\Basket $basket = NULL)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setBasket($basket);
|
||||
@@ -147,10 +129,16 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
return parent::getBasket();
|
||||
}
|
||||
|
||||
public function addValidationParticipant(\Entities\ValidationParticipant $participants)
|
||||
public function addParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::addValidationParticipant($participants);
|
||||
return parent::addParticipant($participants);
|
||||
}
|
||||
|
||||
public function removeParticipant(\Entities\ValidationParticipant $participants)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::removeParticipant($participants);
|
||||
}
|
||||
|
||||
public function getParticipants()
|
||||
@@ -159,42 +147,6 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
return parent::getParticipants();
|
||||
}
|
||||
|
||||
public function getParticipant(\User_Adapter $user, \Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getParticipant($user, $app);
|
||||
}
|
||||
|
||||
public function setInitiatorId($initiatorId)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setInitiatorId($initiatorId);
|
||||
}
|
||||
|
||||
public function getInitiatorId()
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getInitiatorId();
|
||||
}
|
||||
|
||||
public function isInitiator(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::isInitiator($user);
|
||||
}
|
||||
|
||||
public function setInitiator(\User_Adapter $user)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::setInitiator($user);
|
||||
}
|
||||
|
||||
public function getInitiator(\Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getInitiator($app);
|
||||
}
|
||||
|
||||
public function isFinished()
|
||||
{
|
||||
$this->__load();
|
||||
@@ -207,6 +159,12 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
return parent::getValidationString($app, $user);
|
||||
}
|
||||
|
||||
public function getParticipant(\User_Adapter $user, \Alchemy\Phrasea\Application $app)
|
||||
{
|
||||
$this->__load();
|
||||
return parent::getParticipant($user, $app);
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
@@ -222,7 +180,7 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine
|
||||
if ($original === null) {
|
||||
throw new \Doctrine\ORM\EntityNotFoundException();
|
||||
}
|
||||
foreach ($class->reflFields AS $field => $reflProperty) {
|
||||
foreach ($class->reflFields as $field => $reflProperty) {
|
||||
$reflProperty->setValue($this, $reflProperty->getValue($original));
|
||||
}
|
||||
unset($this->_entityPersister, $this->_identifier);
|
||||
|
@@ -26,7 +26,6 @@ class UsrListEntryRepository extends EntityRepository
|
||||
$dql = 'SELECT e FROM Entities\UsrListEntry e
|
||||
WHERE e.usr_id = :usr_id';
|
||||
|
||||
|
||||
$params = array(
|
||||
'usr_id' => $user->get_id(),
|
||||
);
|
||||
|
@@ -28,7 +28,6 @@ class UsrListRepository extends EntityRepository
|
||||
JOIN l.owners o
|
||||
WHERE o.usr_id = :usr_id';
|
||||
|
||||
|
||||
$params = array(
|
||||
'usr_id' => $user->get_id(),
|
||||
);
|
||||
|
@@ -44,4 +44,3 @@ class ValidationParticipantRepository extends EntityRepository
|
||||
->getResult();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1486,7 +1486,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
|
||||
$module->setModuleId($app_id);
|
||||
$module->setSession($session);
|
||||
$session->addSessionModule($module);
|
||||
$session->addModule($module);
|
||||
|
||||
$app['EM']->persist($module);
|
||||
$app['EM']->persist($session);
|
||||
|
69
lib/classes/patch/3810.php
Normal file
69
lib/classes/patch/3810.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2012 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
class patch_3810 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a10';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_release()
|
||||
{
|
||||
return $this->release;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function require_all_upgrades()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function concern()
|
||||
{
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply(base $appbox, Application $app)
|
||||
{
|
||||
$sql = 'SELECT id, usage FROM `order`';
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = 'UPDATE `order` SET usage = :usage WHERE id = :id';
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
|
||||
foreach ($rs as $row) {
|
||||
$stmt->execute(array(
|
||||
':usage' => strip_tags($row['usage']),
|
||||
':id' => $row['id'],
|
||||
));
|
||||
}
|
||||
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
@@ -415,7 +415,7 @@ class set_order extends set_abstract
|
||||
$BasketElement->setRecord($record);
|
||||
$BasketElement->setBasket($Basket);
|
||||
|
||||
$Basket->addBasketElement($BasketElement);
|
||||
$Basket->addElement($BasketElement);
|
||||
|
||||
$app['EM']->persist($BasketElement);
|
||||
|
||||
|
@@ -45,7 +45,7 @@ class LoadOneBasketEnv extends \PhraseaFixture\AbstractWZ implements FixtureInte
|
||||
$this->participants[] = $user;
|
||||
}
|
||||
|
||||
public function addBasketElement(\record_adapter $record)
|
||||
public function addElement(\record_adapter $record)
|
||||
{
|
||||
$this->basketElements[] = $record;
|
||||
}
|
||||
@@ -55,7 +55,6 @@ class LoadOneBasketEnv extends \PhraseaFixture\AbstractWZ implements FixtureInte
|
||||
$basket = new \Entities\Basket();
|
||||
|
||||
$basket->setName('test');
|
||||
|
||||
$basket->setDescription('description');
|
||||
|
||||
if (null === $this->user) {
|
||||
@@ -67,13 +66,8 @@ class LoadOneBasketEnv extends \PhraseaFixture\AbstractWZ implements FixtureInte
|
||||
$this->addElementToBasket($manager, $basket);
|
||||
|
||||
$validationSession = new \Entities\ValidationSession();
|
||||
|
||||
$validationSession->setBasket($basket);
|
||||
|
||||
$validationSession->setDescription('Une description au hasard');
|
||||
|
||||
$validationSession->setName('Un nom de validation');
|
||||
|
||||
$expires = new \DateTime();
|
||||
$expires->modify('+1 week');
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class UsrList extends ListAbstract implements FixtureInterface
|
||||
$owner = $this->getReference('one-listowner');
|
||||
|
||||
$list->setName('new list');
|
||||
$list->addUsrListOwner($owner);
|
||||
$list->addOwner($owner);
|
||||
|
||||
/* @var $owner \Entities\UsrListOwner */
|
||||
$owner->setList($list);
|
||||
|
@@ -47,7 +47,7 @@ class UsrListEntry extends ListAbstract implements FixtureInterface
|
||||
$entry->setList($list);
|
||||
|
||||
/* @var $list \Entities\UsrList */
|
||||
$list->addUsrListEntry($entry);
|
||||
$list->addEntrie($entry);
|
||||
|
||||
$manager->persist($entry);
|
||||
$manager->flush();
|
||||
|
@@ -35,9 +35,6 @@ class LoadOneValidationSession extends \PhraseaFixture\AbstractWZ implements Fix
|
||||
$this->getReference('one-basket') // load the one-basket stored reference
|
||||
);
|
||||
|
||||
$validationSession->setDescription('Une description au hasard');
|
||||
$validationSession->setName('Un nom de validation');
|
||||
|
||||
$expires = new \DateTime();
|
||||
$expires->modify('+1 week');
|
||||
$validationSession->setExpires($expires);
|
||||
|
@@ -86,7 +86,7 @@ class BasketsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basketElement->setRecord($record);
|
||||
$basketElement->setLastInBasket();
|
||||
|
||||
$basket->addBasketElement($basketElement);
|
||||
$basket->addElement($basketElement);
|
||||
|
||||
self::$DI['app']['EM']->persist($basket);
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
@@ -133,7 +133,7 @@ class ControllerBasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basket_element->setRecord($record);
|
||||
$basket_element->setLastInBasket();
|
||||
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
|
||||
self::$DI['app']['EM']->persist($basket);
|
||||
self::$DI['app']['EM']->flush();
|
||||
@@ -164,7 +164,7 @@ class ControllerBasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basket_element->setRecord($record);
|
||||
$basket_element->setLastInBasket();
|
||||
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
|
||||
self::$DI['app']['EM']->persist($basket);
|
||||
self::$DI['app']['EM']->flush();
|
||||
@@ -423,9 +423,6 @@ class ControllerBasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
$validationSession = new \Entities\ValidationSession();
|
||||
|
||||
$validationSession->setDescription('Une description au hasard');
|
||||
$validationSession->setName('Un nom de validation');
|
||||
|
||||
$expires = new \DateTime();
|
||||
$expires->modify('+1 week');
|
||||
|
||||
@@ -444,7 +441,7 @@ class ControllerBasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
self::$DI['app']['EM']->persist($validationParticipant);
|
||||
|
||||
$validationSession->addValidationParticipant($validationParticipant);
|
||||
$validationSession->addParticipant($validationParticipant);
|
||||
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
||||
|
@@ -199,11 +199,11 @@ class LazaretTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
->will($this->onConsecutiveCalls('metadataValue', $story->get_serialize_key(), '00001111', 'metafieldValue'));
|
||||
|
||||
//Add the 5 attribute
|
||||
$lazaretFile->addLazaretAttribute($lazaretAttribute);
|
||||
$lazaretFile->addLazaretAttribute($lazaretAttribute);
|
||||
$lazaretFile->addLazaretAttribute($lazaretAttribute);
|
||||
$lazaretFile->addLazaretAttribute($lazaretAttribute);
|
||||
$lazaretFile->addLazaretAttribute($lazaretAttribute);
|
||||
$lazaretFile->addAttribute($lazaretAttribute);
|
||||
$lazaretFile->addAttribute($lazaretAttribute);
|
||||
$lazaretFile->addAttribute($lazaretAttribute);
|
||||
$lazaretFile->addAttribute($lazaretAttribute);
|
||||
$lazaretFile->addAttribute($lazaretAttribute);
|
||||
|
||||
$id = 1;
|
||||
//Expect the retrieval of the lazaret file with the provided id
|
||||
|
@@ -158,7 +158,7 @@ class RecordsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basketElement->setRecord($record);
|
||||
$basketElement->setLastInBasket();
|
||||
|
||||
$basket->addBasketElement($basketElement);
|
||||
$basket->addElement($basketElement);
|
||||
|
||||
self::$DI['app']['EM']->persist($basket);
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
@@ -210,7 +210,7 @@ class RecordsRequestTest extends \PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$basket_element = new \Entities\BasketElement();
|
||||
$basket_element->setRecord($element);
|
||||
$basket_element->setBasket($basket);
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
self::$DI['app']['EM']->persist($basket_element);
|
||||
self::$DI['app']['EM']->flush();
|
||||
}
|
||||
|
@@ -128,13 +128,8 @@ class EntityBasketTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$this->assertNull($this->basket->getValidation());
|
||||
|
||||
$validationSession = new \Entities\ValidationSession();
|
||||
|
||||
$validationSession->setBasket($this->basket);
|
||||
|
||||
$validationSession->setDescription('Une description au hasard');
|
||||
|
||||
$validationSession->setName('Un nom de validation');
|
||||
|
||||
$expires = new \DateTime();
|
||||
$expires->modify('+1 week');
|
||||
|
||||
|
@@ -378,7 +378,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
$basketElement->setRecord(self::$DI['record_1']);
|
||||
$basketElement->setBasket($basket);
|
||||
|
||||
$basket->addBasketElement($basketElement);
|
||||
$basket->addElement($basketElement);
|
||||
|
||||
$em = self::$DI['app']['EM'];
|
||||
|
||||
@@ -419,7 +419,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
$Participant->setCanAgree(true);
|
||||
$Participant->setCanSeeOthers(true);
|
||||
|
||||
$Validation->addValidationParticipant($Participant);
|
||||
$Validation->addParticipant($Participant);
|
||||
$Participant->setSession($Validation);
|
||||
|
||||
$em->persist($Participant);
|
||||
@@ -457,8 +457,8 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
$basketFixture->addParticipant(self::$DI['user_alt1']);
|
||||
$basketFixture->addParticipant(self::$DI['user_alt2']);
|
||||
|
||||
$basketFixture->addBasketElement(self::$DI['record_1']);
|
||||
$basketFixture->addBasketElement(self::$DI['record_2']);
|
||||
$basketFixture->addElement(self::$DI['record_1']);
|
||||
$basketFixture->addElement(self::$DI['record_2']);
|
||||
|
||||
$loader = new Loader();
|
||||
$loader->addFixture($basketFixture);
|
||||
|
@@ -54,7 +54,7 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
$em->persist($basketElement);
|
||||
|
||||
$basket->addBasketElement($basketElement);
|
||||
$basket->addElement($basketElement);
|
||||
|
||||
$em->persist($basket);
|
||||
$em->flush();
|
||||
@@ -505,7 +505,7 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
self::$DI['app']['EM']->persist($basket_element);
|
||||
|
||||
$basket->addBasketElement($basket_element);
|
||||
$basket->addElement($basket_element);
|
||||
$basket = self::$DI['app']['EM']->merge($basket);
|
||||
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
Reference in New Issue
Block a user