Skip to content

Commit

Permalink
Add Templating plugin examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 10, 2023
1 parent 25c5e99 commit 7388fe8
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 47 deletions.
6 changes: 3 additions & 3 deletions .phpstorm.meta.php/.ide-helper.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
'StateMachineSandbox' => \Cake\Http\BaseApplication::class,
'SuperAdmin' => \Cake\Http\BaseApplication::class,
'Tags' => \Cake\Http\BaseApplication::class,
'Template' => \Cake\Http\BaseApplication::class,
'Templating' => \Cake\Http\BaseApplication::class,
'TestHelper' => \Cake\Http\BaseApplication::class,
'TinyAuth' => \Cake\Http\BaseApplication::class,
'Tools' => \Cake\Http\BaseApplication::class,
Expand Down Expand Up @@ -3501,7 +3501,7 @@
);

expectedArguments(
\Template\View\Helper\IconHelper::render(),
\Templating\View\Helper\IconHelper::render(),
0,
argumentsSet('icons'),
);
Expand Down Expand Up @@ -4610,7 +4610,7 @@
'plugins.StateMachineSandbox',
'plugins.SuperAdmin',
'plugins.Tags',
'plugins.Template',
'plugins.Templating',
'plugins.TestHelper',
'plugins.TinyAuth',
'plugins.Tools',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"mjohnson/decoda": "^6.12",
"cakephp/localized": "^5.0",
"jdorn/sql-formatter": "@stable",
"dereuromark/cakephp-template": "dev-master"
"dereuromark/cakephp-templating": "dev-master"
},
"require-dev": {
"robmorgan/phinx": "0.x-dev as 0.15.3",
Expand Down
32 changes: 16 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions config/app_custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
use StateMachine\Illuminator\Task\EventTask;
use StateMachine\Illuminator\Task\StateTask;
use StateMachineSandbox\StateMachine\RegistrationStateMachineHandler;
use Template\Generator\Task\IconRenderTask;
use Template\View\Icon\BootstrapIcon;
use Template\View\Icon\FeatherIcon;
use Template\View\Icon\FontAwesome4Icon;
use Template\View\Icon\FontAwesome6Icon;
use Template\View\Icon\MaterialIcon;
use Templating\Generator\Task\IconRenderTask;
use Templating\View\Icon\BootstrapIcon;
use Templating\View\Icon\FeatherIcon;
use Templating\View\Icon\FontAwesome4Icon;
use Templating\View\Icon\FontAwesome6Icon;
use Templating\View\Icon\MaterialIcon;
use Tools\Error\ErrorLogger;
use Tools\Mailer\Mailer;

Expand Down
2 changes: 1 addition & 1 deletion config/auth_allow.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Sandbox.Sandbox = *
Sandbox.SearchExamples = *
Sandbox.ServiceExamples = *
Sandbox.ToolsExamples = *
Sandbox.TemplateExamples = *
Sandbox.TemplatingExamples = *
Sandbox.MediaEmbed = *
Sandbox.Tryouts = *
Sandbox.TwigExamples = *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Cake\Http\Exception\NotFoundException;
use Tools\View\Icon\IconCollection;

class TemplateExamplesController extends SandboxAppController {
class TemplatingExamplesController extends SandboxAppController {

/**
* @return void
Expand Down
4 changes: 2 additions & 2 deletions plugins/Sandbox/templates/PluginExamples/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<li><?php echo $this->Html->link('Decimals and CakePHP', ['controller' => 'DecimalExamples', 'action' => 'index']); ?></li>
</ul>

<h4>Template plugin <i>(NEW)</i></h4>
<h4>Templating plugin <i>(NEW)</i></h4>
<ul>
<li><?php echo $this->Html->link('Template, Icons and HTML snippets', ['controller' => 'TemplateExamples', 'action' => 'index']); ?></li>
<li><?php echo $this->Html->link('Templating, (Font) icons and HTML snippets', ['controller' => 'TemplatingExamples', 'action' => 'index']); ?></li>
</ul>

<h4>Queue plugin</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
?>

<nav class="actions col-sm-4 col-12">
<?php echo $this->element('navigation/template'); ?>
<?php echo $this->element('navigation/templating'); ?>
</nav>
<div class="page index col-sm-8 col-12">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
?>

<nav class="actions col-sm-4 col-12">
<?php echo $this->element('navigation/template'); ?>
<?php echo $this->element('navigation/templating'); ?>
</nav>
<div class="page index col-sm-8 col-12">

Expand All @@ -22,9 +22,9 @@
</code>

<?php
echo $this->Format->yesNo(1);
echo $this->IconSnippet->yesNo(1);
echo '<br>';
echo $this->Format->yesNo(0);
echo $this->IconSnippet->yesNo(0);
?>

<br><br>
Expand All @@ -41,9 +41,9 @@

<div style="font-size: 18px;">
<?php
echo $this->Format->thumbs(1);
echo $this->IconSnippet->thumbs(1);
echo '<br>';
echo $this->Format->thumbs(0);
echo $this->IconSnippet->thumbs(0);
?>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
?>

<nav class="actions col-sm-4 col-12">
<?php echo $this->element('navigation/template'); ?>
<?php echo $this->element('navigation/templating'); ?>
</nav>
<div class="page index col-sm-8 col-12">

Expand All @@ -19,7 +19,7 @@
$text = <<<TEXT
'Icon' => [
'sets' => [
'fa' => \Template\View\Helper\Icon\FontAwesome4Icon::class,
'fa' => \Templating\View\Helper\Icon\FontAwesome4Icon::class,
],
],
TEXT;
Expand Down Expand Up @@ -65,7 +65,7 @@
$text = <<<TEXT
'Icon' => [
'sets' => [
'bs' => \Template\View\Helper\Icon\BootstrapIcon::class,
'bs' => \Templating\View\Helper\Icon\BootstrapIcon::class,
],
],
TEXT;
Expand Down Expand Up @@ -104,7 +104,7 @@
$text = <<<TEXT
'Icon' => [
'sets' => [
'material' => \Template\View\Helper\Icon\MaterialIcon::class,
'material' => \Templating\View\Helper\Icon\MaterialIcon::class,
],
],
TEXT;
Expand Down Expand Up @@ -146,7 +146,7 @@
$text = <<<TEXT
'Icon' => [
'sets' => [
'feather' => \Template\View\Helper\Icon\FeatherIcon::class,
'feather' => \Templating\View\Helper\Icon\FeatherIcon::class,
],
],
TEXT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
?>
<div class="index">
<h2>Template Plugin examples / showcase</h2>
<h2>Templating Plugin examples / showcase</h2>

<p><a href="https://github.com/dereuromark/cakephp-template" target="_blank">[Source]</a></p>
<p><a href="https://github.com/dereuromark/cakephp-templating" target="_blank">[Source]</a></p>

<?php echo $this->element('Sandbox.actions', ['exclude' => ['iconSets']]); ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<h2>Tools plugin</h2>
<p>
<a href="https://github.com/dereuromark/cakephp-template" target="_blank">[Template Plugin]</a>
<a href="https://github.com/dereuromark/cakephp-templating" target="_blank">[Templating Plugin]</a>
</p>

<ul class="side-nav nav nav-pills nav-stacked flex-column">
<li class="heading"><?= __('Template Examples') ?></li>
<li class="heading"><?= __('Templating Examples') ?></li>
<li><?php echo $this->Navigation->link('Index', ['action' => 'index'])?></li>

<li><?php echo $this->Navigation->link('(Font) Icons', ['action' => 'icons'], ['class' => $this->getRequest()->getParam('action') === 'iconSets' ? 'active' : null])?></li>
Expand Down
6 changes: 4 additions & 2 deletions src/View/AppView.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
* @property \Tools\View\Helper\TextHelper $Text
* @property \Queue\View\Helper\QueueHelper $Queue
* @property \Search\View\Helper\SearchHelper $Search
* @property \Template\View\Helper\IconHelper $Icon
* @property \Templating\View\Helper\IconHelper $Icon
* @property \Templating\View\Helper\IconSnippetHelper $IconSnippet
*/
class AppView extends View {

Expand Down Expand Up @@ -80,7 +81,8 @@ public function initialize(): void {
'Tools.Format',
'Tools.Progress',
'Tools.Meter',
'Template.Icon',
'Templating.Icon',
'Templating.IconSnippet',
'TinyAuth.AuthUser',
'AssetCompress.AssetCompress',
'Shim.Configure',
Expand Down

0 comments on commit 7388fe8

Please sign in to comment.