Ver código fonte

Initial release of PurePlate v1.0.0

michelphp 1 dia atrás
pai
commit
9c706f30ad

+ 0 - 2
tests/views/base.html.twig

@@ -1,2 +0,0 @@
-{% block body %}
-{% endblock %}

+ 0 - 2
tests/views/base.html.twig.php

@@ -1,2 +0,0 @@
-<?php $this->startBlock('body'); ?>
-<?php $this->endBlock(); ?>

+ 0 - 11
tests/views/instruction.html.twig

@@ -1,11 +0,0 @@
-{% if toto.user is not empty          and toto == 1 || php_sapi_name(strlen('toto'),(2 + 2) * trim('12')) === "cli not here" or toto is defined and true == (strlen('true') === 4) %}
-    affiche moi toto
-{% endif %}
-
-{% if users %}
-    <ul>
-        {% for user in users %}
-            <li>{{ user.username|e }}</li>
-        {% endfor %}
-    </ul>
-{% endif %}

+ 0 - 61
tests/views/twig.html.twig

@@ -1,61 +0,0 @@
-{% extends 'base.html.twig' %}
-
-
-{% set user = "Alice" %}
-{% set discount = 15 %}
-{% set initialPrice = 200 %}
-{% set isMember = true %}
-{% set items = 5 %}
-{% set bonusPoints = 50 ? isMember : "tata" %}
-{% set toto = ['toto'] %}
-{% set toto2 = new stdClass() %}
-{{ isMember ? "Eligible for members special gift ?"|upper|lower : ":Regular item" }}
-
-{% block body %}
-
-Hello, {{ user }}!
-
-{% if isMember %}
-        {% set finalPrice = initialPrice - (initialPrice * discount / 100) %}
-        You have a discount of {{ discount }}%, so the final price is {{ finalPrice }} EUR.
-
-        {% if finalPrice < 100 %}
-                You're eligible for free shipping!
-        {% else %}
-                Shipping costs will apply.
-        {% endif %}
-{% else %}
-        No discount applies since you are not a member.
-        The price remains {{ initialPrice }} EUR.
-{% endif %}
-
-{% if items > 3 %}
-        As you have more than 3 items, you receive an additional 10 bonus points!
-        {% set bonusPoints = bonusPoints + 10 %}
-{% endif %}
-
-Your total bonus points: {{bonusPoints }}.
-
-{% for i in 1..items %}
-        - Item {{ i }}: {{ isMember ? "Eligible for members special gift ?"|upper : ":Regular item" }}\n
-        {% if i == 10 %}
-                This is an even-numbered item.
-        {% else %}
-                This is an odd-numbered item.
-        {% endif %}
-{% endfor %}
-
-{% if items == 0 %}
-        You have no items in your cart.
-{% elseif items == 1 %}
-        You have 1 item in your cart.
-{% else %}
-        You have {{ items + 41 }} items in your cart.
-{% endif %}
-
-{{ dump(isMember) }}
-{% if isMember === true %}
-{{ 'okkkkkkkkkkkkkkkk'|upper|lower }}
-{% endif %}
-
-{% endblock %}

+ 0 - 61
tests/views/twig.html.twig.php

@@ -1,61 +0,0 @@
-<?php $this->extend('base.html.twig.php'); ?>
-
-
-<?php $user = "Alice"; ?>
-<?php $discount = 15; ?>
-<?php $initialPrice = 200; ?>
-<?php $isMember = true; ?>
-<?php $items = 5; ?>
-<?php $bonusPoints = 50 ? $isMember : "tata"; ?>
-<?php $toto = ['toto']; ?>
-<?php $toto2 = new stdClass(); ?>
-<?php echo $isMember ? $__filters['lower']($__filters['upper']("Eligible for members special gift ?")) : ":Regular item"; ?>
-
-<?php $this->startBlock('body'); ?>
-
-Hello, <?php echo $user; ?>!
-
-<?php if ($isMember): ?>
-        <?php $finalPrice = $initialPrice - ( $initialPrice * $discount / 100 ); ?>
-        You have a discount of <?php echo $discount; ?>%, so the final price is <?php echo $finalPrice; ?> EUR.
-
-        <?php if ($finalPrice < 100): ?>
-                You're eligible for free shipping!
-        <?php else: ?>
-                Shipping costs will apply.
-        <?php endif; ?>
-<?php else: ?>
-        No discount applies since you are not a member.
-        The price remains <?php echo $initialPrice; ?> EUR.
-<?php endif; ?>
-
-<?php if ($items > 3): ?>
-        As you have more than 3 items, you receive an additional 10 bonus points!
-        <?php $bonusPoints = $bonusPoints + 10; ?>
-<?php endif; ?>
-
-Your total bonus points: <?php echo $bonusPoints; ?>.
-
-<?php foreach (range(1,$items) as $i): ?>
-        - Item <?php echo $i; ?>: <?php echo $isMember ? $__filters['upper']("Eligible for members special gift ?") : ":Regular item"; ?>\n
-        <?php if ($i == 10): ?>
-                This is an even-numbered item.
-        <?php else: ?>
-                This is an odd-numbered item.
-        <?php endif; ?>
-<?php endforeach; ?>
-
-<?php if ($items == 0): ?>
-        You have no items in your cart.
-<?php elseif ($items == 1): ?>
-        You have 1 item in your cart.
-<?php else: ?>
-        You have <?php echo $items + 41; ?> items in your cart.
-<?php endif; ?>
-
-<?php echo $__functions['dump'] ( $isMember ); ?>
-<?php if ($isMember === true): ?>
-<?php echo $__filters['lower']($__filters['upper']('okkkkkkkkkkkkkkkk')); ?>
-<?php endif; ?>
-
-<?php $this->endBlock(); ?>