-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Teepluss
committed
Mar 21, 2015
1 parent
03eec66
commit cc5e2aa
Showing
4 changed files
with
14 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -594,6 +594,9 @@ echo Theme::widget('demo', array('label' => 'Demo Widget'))->render(); | |
|
||
### Using theme global | ||
~~~php | ||
|
||
use Teepluss\Theme\Contracts\Theme; | ||
|
||
class BaseController extends Controller { | ||
|
||
/** | ||
|
@@ -608,10 +611,10 @@ class BaseController extends Controller { | |
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
public function __construct(Theme $theme) | ||
{ | ||
// Using theme as a global. | ||
$this->theme = Theme::uses('default')->layout('ipad'); | ||
$this->theme = $theme->uses('default')->layout('ipad'); | ||
} | ||
|
||
} | ||
|
@@ -630,26 +633,6 @@ public function getIndex() | |
} | ||
~~~ | ||
|
||
## Changes | ||
|
||
#### v1.1.2 | ||
- Bug fixed. | ||
- Added method watchPartial to look up in main view folder. | ||
- Fixed compress JS and CSS. | ||
- Fixed asset URL doesn't read from config. | ||
|
||
#### v1.0.1 | ||
- Added method "ofWithLayout" and "scopeWithLayout" to add theme prefix before look up view. | ||
- Asset queue can use callable to group assets in one queue. | ||
- Stop asset compression using capture. | ||
|
||
#### v1.0.0 | ||
- Added method "asset()->cook" and "asset()->server" to prepare group of assets. | ||
- Added method "bind" to prepare variable. | ||
- Added method "watch" to widget. | ||
- Added methed Theme::symlink to look up view from another theme. | ||
- Added method Theme::share to override View::share. | ||
|
||
## Support or Contact | ||
|
||
If you have any problems, Contact [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php namespace Teepluss\Theme\Contracts; | ||
|
||
interface Theme { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters