We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba9074 commit 0d8d656Copy full SHA for 0d8d656
Assets.php
@@ -26,9 +26,8 @@ public function expand($uri){
26
}
27
28
29
- private $published = false;
30
-
31
// for detecting whether to load default assets or not
+ private $published = false;
32
public function published($set=null){
33
if($set === null)
34
return $this->published;
@@ -37,4 +36,17 @@ public function published($set=null){
37
36
38
return $this;
39
+
40
+ protected $defaultCallable;
41
+ public function setDefault($callable){
42
+ $this->defaultCallable = $callable;
43
+ }
44
45
+ public function publishDefault(){
46
+ if(!is_callable($this->defaultCallable))
47
+ return ;
48
49
+ $tmp = $this->defaultCallable;
50
+ $tmp($this);
51
52
0 commit comments