Comments (6)
Did you add getVars
through an extension? as Twig is only aware of functions you tell it about.
from legacy-twig-view.
As I'm unfamiliar with what you are proposing, I'm going to have to say no :)
ATM, I'm simply trying to modify my bake templates. I'm attempting to use available variables to accomplish this. The getVars was supposed to tell me what is available and to see what else I needed.
Edit #1: FWIW, I tried the same function in form.twig, in Templates and I get the same error.
from legacy-twig-view.
getVars()
is a function provided by https://github.com/WyriHaximus/TwigView/blob/a5ec66690aa045d6eda17ab1c8a5baf0efdcfa45/src/Lib/Twig/Extension/View.php#L51-L53
but the extension is missing in https://github.com/WyriHaximus/TwigView/blob/a5ec66690aa045d6eda17ab1c8a5baf0efdcfa45/src/Event/ExtensionsListener.php#L64-L73
from legacy-twig-view.
FWIW, I attempted to load the missing extension View. However, it seems the constructor requires a CakeView parameter which is missing and throwing an error.
from legacy-twig-view.
$event->getTwig()->addExtension(new Extension\View($event->getTwigView()));
from legacy-twig-view.
That works, no more errors. From the variables listed, I'm not seeing what I need. That's for another day :)
from legacy-twig-view.
Related Issues (20)
- Deprecation error while running cake bake HOT 1
- Dependabot can't resolve your PHP dependency files HOT 2
- Deprecations warnings HOT 4
- Using include function HOT 1
- Update composer.json to allow twig 3.0 HOT 15
- Dependabot couldn't fetch the branch/reference for cakephp/cakephp-codesniffer
- Call to a member function loadTemplate() on null HOT 1
- Disable Twig cache in debug mode
- Align travis and composer scripts with cakephp
- Move to cakephp namespace with backwards compatible alias
- Align phpcs settings HOT 1
- Align code coverage with cakephp
- The unit tests will be failed on CakePHP 4.1.x version HOT 2
- update links
- Issue with Twig when trying to bake in cakephp 3.x HOT 1
- Name conflict with Twig default filter HOT 4
- Roadmap v5.0 HOT 31
- mb_convert_encoding(): Illegal character encoding specified HOT 8
- add missing inflectors HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legacy-twig-view.