mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Use composer as application autoloader
This commit is contained in:
85
lib/classes/record/orderElement.php
Normal file
85
lib/classes/record/orderElement.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class record_orderElement extends record_adapter
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $deny;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $order_master_id;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param int $base_id
|
||||
* @param int $record_id
|
||||
* @param boolean $deny
|
||||
* @param int $order_master_id
|
||||
*/
|
||||
public function __construct(Application $app, $sbas_id, $record_id, $deny, $order_master_id)
|
||||
{
|
||||
$this->deny = ! ! $deny;
|
||||
$this->order_master_id = $order_master_id;
|
||||
|
||||
parent::__construct($app, $sbas_id, $record_id);
|
||||
|
||||
$this->get_subdefs();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_order_master_name()
|
||||
{
|
||||
if ($this->order_master_id) {
|
||||
$user = User_Adapter::getInstance($this->order_master_id, $this->app);
|
||||
|
||||
return $user->get_display_name();
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_order_master_id()
|
||||
{
|
||||
return $this->order_master_id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function get_deny()
|
||||
{
|
||||
return $this->deny;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user