-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from arodu/develop
Develop
- Loading branch information
Showing
1,555 changed files
with
397,063 additions
and
226,152 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
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CakeLte\Controller; | ||
|
||
use App\Controller\AppController as BaseController; | ||
|
||
class AppController extends BaseController { | ||
class AppController extends BaseController | ||
{ | ||
} |
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CakeLte\Controller; | ||
|
||
use CakeLte\Controller\AppController; | ||
|
||
class PagesController extends AppController { | ||
|
||
public function debug() { | ||
} | ||
class PagesController extends AppController | ||
{ | ||
public function debug() | ||
{ | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CakeLte\View; | ||
|
||
use BootstrapUI\View\UIViewTrait; | ||
|
||
trait CakeLteTrait { | ||
|
||
use UIViewTrait; | ||
|
||
protected $settings = [ | ||
// configure layout options | ||
'appName' => 'Cake<b>LTE</b>', // [string] default='Cake<b>LTE</b>' | ||
'appLogo' => 'CakeLte.cake.icon.png', // [string] default='CakeLte.cake.icon.png' | ||
|
||
'small-text' => false, | ||
'fixed-navbar' => false, | ||
'fixed-footer' => false, | ||
'fixed-sidebar' => false, | ||
'collapsed-sidebar' => false, | ||
'boxed-layout' => false, | ||
|
||
'navbar-style' => 'white', | ||
]; | ||
|
||
protected $navbar = [ | ||
'primary' => 'navbar-dark navbar-primary', | ||
'secondary' => 'navbar-dark navbar-secondary', | ||
'info' => 'navbar-dark navbar-info', | ||
'success' => 'navbar-dark navbar-success', | ||
'danger' => 'navbar-dark navbar-danger', | ||
'light' => 'navbar-light', | ||
'warning' => 'navbar-light navbar-warning', | ||
'white' => 'navbar-light navbar-white', | ||
]; | ||
|
||
public function initializeCakeLte(array $options = []): void { | ||
$this->settings = array_merge($this->settings, $options); | ||
$this->initializeUI(); | ||
} | ||
trait CakeLteTrait | ||
{ | ||
use UIViewTrait; | ||
|
||
/** | ||
* Initialize CakeLte plugin | ||
* | ||
* @param array $options Options | ||
* @return void | ||
*/ | ||
public function initializeCakeLte(array $options = []): void | ||
{ | ||
$this->initializeUI(); | ||
$this->loadHelper('CakeLte.CakeLte', $options); | ||
} | ||
|
||
public function element(string $name, array $data = [], array $options = []): string { | ||
if ($this->_getElementFileName($name, false)) { | ||
$options = array_merge($options, ['plugin' => false]); | ||
} else { | ||
$name = 'CakeLte.' . $name; | ||
/** | ||
* @param string $name Name | ||
* @param array $data data | ||
* @param array $options Options | ||
* @return string | ||
*/ | ||
public function element(string $name, array $data = [], array $options = []): string | ||
{ | ||
if ($this->_getElementFileName($name, false)) { | ||
$options = array_merge($options, ['plugin' => false]); | ||
} else { | ||
$name = 'CakeLte.' . $name; | ||
} | ||
|
||
return parent::element($name, $data, $options); | ||
} | ||
return parent::element($name, $data, $options); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CakeLte\View; | ||
|
||
use Cake\View\View; | ||
|
||
class CakeLteView extends View { | ||
use CakeLteTrait; | ||
class CakeLteView extends View | ||
{ | ||
use CakeLteTrait; | ||
|
||
public $layout = 'CakeLte.default'; | ||
public $layout = 'CakeLte.default'; | ||
|
||
public function initialize(): void { | ||
parent::initialize(); | ||
$this->initializeCakeLte(); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function initialize(): void | ||
{ | ||
parent::initialize(); | ||
$this->initializeCakeLte(); | ||
} | ||
} |
Oops, something went wrong.