diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index 885685ef89..188e1ccc22 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -296,13 +296,21 @@ class databox_subdef /** * boolean * - * @return type + * @return bool */ - public function is_downloadable() + public function isDownloadable() { 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 * diff --git a/templates/web/admin/subdefs.html.twig b/templates/web/admin/subdefs.html.twig index 6fadce7bdc..ae3ba4b722 100644 --- a/templates/web/admin/subdefs.html.twig +++ b/templates/web/admin/subdefs.html.twig @@ -401,7 +401,7 @@ {{ 'Telechargeable' | trans }} - + diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php index 4d413c2e9d..54bf3e89b1 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php @@ -83,7 +83,7 @@ class SubdefsTest extends \PhraseanetAuthenticatedWebTestCase $subdefs = new \databox_subdefsStructure($app->findDataboxById($this->databox_id), $app['translator']); $subdef = $subdefs->get_subdef("image", $name); /* @var $subdef \databox_subdef */ - $this->assertFalse($subdef->is_downloadable()); + $this->assertFalse($subdef->isDownloadable()); $options = $subdef->getOptions(); $this->assertTrue(is_array($options)); $this->assertEquals(400, $options[Image::OPTION_SIZE]->getValue());