igaster\laravelTheme\Themes::exists PHP Метод

exists() публичный Метод

Check if $themeName is a valid Theme
public exists ( string $themeName ) : boolean
$themeName string
Результат boolean
    public function exists($themeName)
    {
        return $this->find($themeName) !== false;
    }

Usage Example

Пример #1
0
 public function testThemes()
 {
     $theme1 = new Theme('theme1');
     $theme2 = new Theme('theme2');
     $themes = new Themes();
     $themes->add($theme1);
     $themes->add($theme2, 'theme1');
     $this->assertEquals($theme1, $themes->find('theme1'));
     $this->assertEquals($theme2, $themes->find('theme2'));
     $this->assertEquals(false, $themes->find('themeXXX'));
     $this->assertEquals($theme1, $theme2->getParent());
     $this->assertTrue($themes->exists('theme1'));
     $this->assertFalse($themes->exists('themeXXX'));
 }