mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Change Elastic Field structure to cope with Collection base_ids
This commit is contained in:
@@ -20,6 +20,7 @@ class Field
|
||||
private $is_private;
|
||||
private $is_facet;
|
||||
private $thesaurus_roots;
|
||||
private $used_by_collections;
|
||||
|
||||
public static function createFromLegacyField(databox_field $field)
|
||||
{
|
||||
@@ -54,9 +55,9 @@ class Field
|
||||
case databox_field::TYPE_STRING:
|
||||
case databox_field::TYPE_TEXT:
|
||||
return Mapping::TYPE_STRING;
|
||||
default:
|
||||
throw new Exception(sprintf('Invalid field type "%s", expected "date", "number" or "string".', $type));
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('Invalid field type "%s", expected "date", "number" or "string".', $type));
|
||||
}
|
||||
|
||||
public function __construct($name, $type, array $options = [])
|
||||
@@ -97,6 +98,11 @@ class Field
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function getCollections()
|
||||
{
|
||||
return $this->collections;
|
||||
}
|
||||
|
||||
public function isSearchable()
|
||||
{
|
||||
return $this->is_searchable;
|
||||
|
Reference in New Issue
Block a user