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
console.log(window.dataLayer); |
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
public function escapeHtml($data, $allowedTags = null) | |
public function escapeHtmlAttr($string, $escapeSingleQuote = true) | |
public function escapeUrl($string) | |
public function encodeUrlParam($string) | |
public function escapeJs($string) | |
public function escapeCss($string) | |
$block->escapeHtml(__("")); | |
<?= $block->escapeHtml(__("")); ?> |
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
alias magento-command='docker-compose run --rm cli magento-command' | |
alias dcud='docker-compose up -d' | |
alias dcdv='docker-compose down -v' | |
alias dcd='docker-compose down' | |
alias dcr='docker-compose restart' | |
alias dreload='docker compose down -v; docker-compose pull; docker-compose up -d' | |
alias cli='docker-compose run --rm cli' | |
alias installer='docker-compose run --rm cli magento-extension-installer' | |
alias csf-nodoc='docker run --rm -v $PWD:/code domw/php-cs-fixer php-cs-fixer fix --verbose --using-cache=no --rules=phpdoc_no_package,ordered_imports ./' | |
alias csf-m2='docker run --rm -v $PWD:/code domw/php-cs-fixer php-cs-fixer fix --rules='\''{"@PSR2":true,"array_syntax":{"syntax":"short"},"concat_space":{"spacing":"one"},"include":true,"new_with_braces":true,"no_empty_statement":true,"no_extra_consecutive_blank_lines":true,"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_multiline_whitespace_around_double_arrow":true,"no_multiline_whitespace_before_semicolons":true,"no_singleline_whitesp |
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
docker run --rm -v $PWD:/code domw/phpcs phpcs --colors --standard=Magento2 --report=full,summary --extensions=php,phtml ./ |
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
docker run --rm -v $PWD:/code domw/php-cs-fixer php-cs-fixer fix --verbose --using-cache=no --rules=phpdoc_no_package,ordered_imports ./ |
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
\Magento\Framework\Filesystem\Io\File | |
public function __construct( | |
\Magento\Framework\Filesystem\Io\File $file | |
) { | |
$this->file = $file; | |
} | |
public function streamRead($length = 1024) | |
public function streamReadCsv($delimiter = ',', $enclosure = '"') |
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
use Magento\Directory\Model\CurrencyFactory $currencyFactory | |
protected $currencyFactory; | |
public function __construct( | |
CurrencyFactory $currencyFactory | |
) { | |
$this->currencyFactory = $currencyFactory; | |
} |
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
php -m |
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
$action = $_POST['action'] ?? 'default'; | |
// The above is identical to this if/else statement | |
if (isset($_POST['action'])) { | |
$action = $_POST['action']; | |
} else { | |
$action = 'default'; | |
} |
OlderNewer