-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
72 additions
and
11 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 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
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
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,17 @@ | ||
# Release build script for Twig Plugin | ||
# Copyright (c) Sergey Romanenko | ||
# usage: bash release.sh [version] | ||
|
||
name="twig"; | ||
version="$1"; | ||
curl "https://github.com/flextype-plugins/$name/archive/refs/tags/v$version.zip" -L -O; | ||
unzip "v$version.zip"; | ||
rm "v$version.zip"; | ||
cd "$name-$version"; | ||
composer install --no-dev; | ||
rm -rf __MACOSX; | ||
find . -name '.DS_Store' -type f -delete; | ||
zip -r "$name-$version.zip" . ; | ||
cd ../; | ||
mv "$name-$version/$name-$version.zip" .; | ||
rm -r "$name-$version/"; |
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 |
---|---|---|
|
@@ -58,6 +58,7 @@ extensions: | |
- Cache | ||
- Image | ||
- Url | ||
- Vars | ||
|
||
# Twig plugin priority | ||
priority: 0 |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* Flextype - Hybrid Content Management System with the freedom of a headless CMS | ||
* and with the full functionality of a traditional CMS! | ||
* | ||
* Copyright (c) Sergey Romanenko (https://awilum.github.io) | ||
* | ||
* Licensed under The MIT License. | ||
* | ||
* For full copyright and license information, please see the LICENSE | ||
* Redistributions of files must retain the above copyright notice. | ||
*/ | ||
|
||
namespace Flextype\Plugin\Twig\Extension; | ||
|
||
use Twig\Extension\AbstractExtension; | ||
use Twig\TwigFunction; | ||
use function Flextype\vars; | ||
|
||
class VarsTwigExtension extends AbstractExtension | ||
{ | ||
/** | ||
* Callback for twig. | ||
* | ||
* @return array | ||
*/ | ||
public function getFunctions() : array | ||
{ | ||
return [ | ||
new TwigFunction('vars', '\Flextype\vars') | ||
]; | ||
} | ||
} |
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