Bring Asset in line with inTheme
This commit is contained in:
parent
045d186960
commit
7f209d2df9
|
|
@ -92,6 +92,20 @@ class Asset extends Extendable
|
||||||
return (new static($theme))->find($fileName);
|
return (new static($theme))->find($fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares the theme datasource for the model.
|
||||||
|
* @param \Cms\Classes\Theme $theme Specifies a parent theme.
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public static function inTheme($theme)
|
||||||
|
{
|
||||||
|
if (is_string($theme)) {
|
||||||
|
$theme = Theme::load($theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new static($theme);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a single template by its file name.
|
* Find a single template by its file name.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue