This file contains hidden or 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
/* Command strings */ | |
#define GET_CAN_EXPAND "raspi-config nonint get_can_expand" | |
#define EXPAND_FS "raspi-config nonint do_expand_rootfs" | |
#define GET_HOSTNAME "raspi-config nonint get_hostname" | |
#define SET_HOSTNAME "raspi-config nonint do_hostname %s" | |
#define GET_BOOT_CLI "raspi-config nonint get_boot_cli" | |
#define GET_AUTOLOGIN "raspi-config nonint get_autologin" | |
#define SET_BOOT_CLI "raspi-config nonint do_boot_behaviour B1" | |
#define SET_BOOT_CLIA "raspi-config nonint do_boot_behaviour B2" | |
#define SET_BOOT_GUI "raspi-config nonint do_boot_behaviour B3" |
This file contains hidden or 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
{% set contents = {"one": 1,"two":2,"three":3,"four":4,"five":5} %} | |
{# Create the array an structure somewhere in the view #} | |
{% set twigArray = {} %} | |
{% for content in contents %} | |
{% set twigArray = twigArray|merge({('hashkey_'~loop.index0):{'enabled':true,'caption':'unknow','button':{'text':'unknow','href':'unknow'},'image':{'src': content.content|raw),'alt':"image-"~loop.index, 'href':"" }}}) %} | |
{% endfor %} | |
{{ dump(twigArray)}} | |
{# For any reason you need to update a specific key value in the exiting array in the view | |
call the twig extension to do that in php side #} |
OlderNewer