aboutsummaryrefslogtreecommitdiff
path: root/app/class/Medialist.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-23 01:18:33 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-23 01:18:33 +0100
commita66df8c97f4aa70977b25478fc3b6413ebd9b9db (patch)
tree564670e31f82083411dd6749ccfb27f5038907fe /app/class/Medialist.php
parent11c729472634682fbcaa40caa5c510d490acfa4a (diff)
downloadwcms-a66df8c97f4aa70977b25478fc3b6413ebd9b9db.tar.gz
wcms-a66df8c97f4aa70977b25478fc3b6413ebd9b9db.zip
new media types
Diffstat (limited to 'app/class/Medialist.php')
-rw-r--r--app/class/Medialist.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/class/Medialist.php b/app/class/Medialist.php
index b208fef..2c17fa0 100644
--- a/app/class/Medialist.php
+++ b/app/class/Medialist.php
@@ -20,7 +20,7 @@ class Medialist
protected $order = 1;
/** @var array list of media type to display */
- protected $type = ['image', 'sound', 'video', 'other'];
+ protected $type = [];
/** @var int display media contents*/
protected $display = 1;
@@ -42,6 +42,7 @@ class Medialist
public function __construct(array $datas = [])
{
+ $this->type = Model::mediatypes();
$this->hydrate($datas);
}
@@ -226,7 +227,7 @@ class Medialist
public function settype($type)
{
if(is_array($type)) {
- $this->type = array_intersect(self::TYPES, array_unique($type));
+ $this->type = array_intersect(Model::mediatypes(), array_unique($type));
}
}
}