mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
Add orderable flat to subdef
This commit is contained in:
@@ -59,6 +59,11 @@ class databox_subdef
|
||||
*/
|
||||
private $requiresMetadataUpdate;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $orderable;
|
||||
|
||||
/**
|
||||
* @param SubdefType $type
|
||||
* @param SimpleXMLElement $sd
|
||||
@@ -76,6 +81,7 @@ class databox_subdef
|
||||
|
||||
$this->name = strtolower($sd->attributes()->name);
|
||||
$this->downloadable = p4field::isyes($sd->attributes()->downloadable);
|
||||
$this->orderable = isset($sd->attributes()->orderable) ? p4field::isyes($sd->attributes()->orderable) : true;
|
||||
$this->path = trim($sd->path) !== '' ? p4string::addEndSlash(trim($sd->path)) : '';
|
||||
|
||||
$this->requiresMetadataUpdate = p4field::isyes((string) $sd->meta);
|
||||
@@ -314,6 +320,14 @@ class databox_subdef
|
||||
return $this->downloadable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isOrderable()
|
||||
{
|
||||
return $this->orderable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of Alchemy\Phrasea\Media\Subdef\Subdef available for the current Media Type
|
||||
*
|
||||
|
Reference in New Issue
Block a user