Exemplo n.º 1
0
 public function listVocabularies()
 {
     $vocabularies = VocabularyController::getAvailable($this->app);
     return $this->app->json(array_map(function (ControlProviderInterface $vocabulary) {
         return ['type' => $vocabulary->getType(), 'name' => $vocabulary->getName()];
     }, $vocabularies));
 }
Exemplo n.º 2
0
 public function testGetAvailable()
 {
     $available = Controller::getAvailable(self::$DI['app']);
     $this->assertTrue(is_array($available));
     foreach ($available as $controller) {
         $this->assertInstanceOf('\\Alchemy\\Phrasea\\Vocabulary\\ControlProvider\\ControlProviderInterface', $controller);
     }
 }
Exemplo n.º 3
0
 public function listVocabularies(Application $app, Request $request)
 {
     $vocabularies = VocabularyController::getAvailable($app);
     return $app->json(array_map(function ($vocabulary) {
         return ['type' => $vocabulary->getType(), 'name' => $vocabulary->getName()];
     }, $vocabularies));
 }