-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add example for Area Brick * Add example for Areabrick * Remove iframe * Update default.html.twig * Add example for Area Brick * Update events.html.twig * Update Validity.php * Update default.html.twig * Update templates/areas/validity/view.html.twig Co-authored-by: robertSt7 <[email protected]> --------- Co-authored-by: robertSt7 <[email protected]>
- Loading branch information
1 parent
4fea4ca
commit 9acc781
Showing
5 changed files
with
36 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace App\MyAreaBricks\Custom\Areabricks; | ||
|
||
use Pimcore\Extension\Document\Areabrick\Attribute\AsAreabrick; | ||
use Pimcore\Extension\Document\Areabrick\AbstractTemplateAreabrick; | ||
|
||
#[AsAreabrick(id: 'validity')] | ||
class Validity extends AbstractTemplateAreabrick | ||
{ | ||
public function getName(): string | ||
{ | ||
return 'Validity'; | ||
} | ||
} |
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,15 @@ | ||
|
||
{% if editmode %} | ||
{{ pimcore_select("validity", { | ||
"store": [ | ||
["one-month", "One month"], | ||
["three-months", "Three months"], | ||
["unlimited", "Unlimited"] | ||
], | ||
"defaultValue" : "unlimited" | ||
}) }} | ||
{% else %} | ||
<p> | ||
{{ "This is valid for" | trans }}: {{ pimcore_select("validity").getData() | trans }} | ||
</p> | ||
{% endif %} |
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