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
# Translate value | |
{{ value|trans() }} | |
# Translate with prefix | |
{{ ('prefix.' ~ value)|trans() }} |
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
# Gibt die Verzeichnisgrößen aller Unterordner im aktuellen Verzeichnis an. | |
du -sh ./* |
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
// Search and replace in IDE | |
// Search string | |
php_function_to_remove\((.*?)\){1} //e.g utf8_decode\((.*?)\){1} | |
// Replace string | |
$1 |
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
lib.pageResourceImage = FILES | |
lib.pageResourceImage { | |
maxFiles = 1 | |
references { | |
table = pages | |
data = levelmedia:-1, slide | |
fieldName = media | |
uid.data = field:pageUid | |
} | |
renderObj = TEXT |
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
$items = $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items']; | |
foreach($items as $item) { | |
if ($item[1] != '--div--') { | |
echo $item[1] . ', '; | |
} | |
} | |
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
# Add folder local_extension to document root and place sitepackage inside of it | |
# then add the repository to composer.json calling | |
composer config repositories.sitepackage path local_extensions/* | |
# then install the sitepackage in composer | |
composer req pixelink/sitepackage | |
# thats it all required extensions are loaded and it's autoloaded if therer are any extensions hooks or similar |
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
function convertXmlObjToArr(\SimpleXMLElement $node) : array | |
{ | |
$element = [ | |
'@name' => strtolower((string)$node->getName()), | |
'@attributes' => [] | |
]; | |
$attributes = $node->attributes(); | |
foreach ($attributes as $attributeName => $attributeValue) | |
{ | |
$attribName = strtolower(trim((string)$attributeName)); |
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
# lazy as every dev i wanted to have some shortcuts for the ddev. | |
# feel free to use | |
# Manchmal werden die aliase nicht übernommen, dann müssen die manuell in die Datei | |
# ~/.zshrc | |
# eingetragen werden. | |
# Just run that line of code to add the aliases to zsh | |
alias ddcf='ddev config' ddsp='ddev sequelpro' dddesc='ddev describe' ddhost='ddev hostname' ddimpdb='ddev import-db' ddimpfile='ddev import-files' ddls='ddev list' ddlog='ddev log' ddrm='ddev remove' ddrs='ddev restart' ddsnap='ddev snapshot' ddrestore='ddev restore-snapshot' ddssh='ddev ssh' ddstart='ddev start' ddstop='ddev stop' ddver='ddev version' |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder