Beispiel #1
0
 /**
  * Add a new theme to the hierarcy. Optionaly define a parent theme.
  *
  * @param   \igaster\laravelTheme\Theme $theme
  * @param   string $parentName
  * @return  \igaster\laravelTheme\Theme
  */
 public function add(Theme $theme, $parentName = '')
 {
     if ($parentName) {
         $parentTheme = $this->find($parentName);
     } else {
         $parentTheme = $this->root;
     }
     $theme->addParent($parentTheme);
     return $theme;
 }
Beispiel #2
0
 /**
  * Add a new theme to the hierarcy. Optionaly define a parent theme.
  *
  * @param   \igaster\laravelTheme\Theme $theme
  * @param   string $parentName
  * @return  \igaster\laravelTheme\Theme
  */
 public function add(Theme $theme, $parentName = '')
 {
     $theme->addParent($parentName ? $this->find($parentName) : $this->root);
     return $theme;
 }