/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $themes = $this->themeRegistry->getAllThemes(); $activeTheme = $this->themeRegistry->getActiveTheme(); if ($themes) { $output->writeln('<info>List of available themes:</info>'); foreach ($themes as $theme) { $this->outputTheme($output, $theme, $theme === $activeTheme); } } else { $output->writeln('<info>No themes are available.</info>'); } }
public function testGetTheme() { $fooTheme = $this->themeRegistry->getTheme('foo'); $this->assertInstanceOf('Oro\\Bundle\\ThemeBundle\\Model\\Theme', $fooTheme); $this->assertEquals(array('style.css'), $fooTheme->getStyles()); $this->assertEquals('Foo Theme', $fooTheme->getLabel()); $this->assertEquals('favicon.ico', $fooTheme->getIcon()); $this->assertEquals('logo.png', $fooTheme->getLogo()); $this->assertEquals('screenshot.png', $fooTheme->getScreenshot()); $this->assertSame($fooTheme, $this->themeRegistry->getTheme('foo')); $barTheme = $this->themeRegistry->getTheme('bar'); $this->assertInstanceOf('Oro\\Bundle\\ThemeBundle\\Model\\Theme', $barTheme); $this->assertEquals(array('style.css'), $barTheme->getStyles()); $this->assertNull($barTheme->getLabel()); $this->assertNull($barTheme->getIcon()); $this->assertNull($barTheme->getLogo()); $this->assertNull($barTheme->getScreenshot()); $this->assertSame($barTheme, $this->themeRegistry->getTheme('bar')); $this->assertEquals(array('foo' => $fooTheme, 'bar' => $barTheme), $this->themeRegistry->getAllThemes()); }