You can download configs with all of the Templates listed below as one file ⬇️ Here
Read more about JetBrains' live templates here. Use template's header as abbreviation.
- Typography templates
- Bootstrap templates
- HTML templates
- PHP | Echo php code | (=)
- PHP | Echo php code | (ec)
- Yii2 | Translation of word via Yii:t() | (yt)
- Yii2 | Url helper | (url)
- Yii2 | Url helper | (uweb)
- Yii2 | Url helper | (route)
- PHP | Open php tag | (php)
- PHP | Number Format | (nf)
- PHP | Generates/surrounds selection with foreach | (foreach)
- PHP | Generates/surrounds selection with if | (if)
- PHPDoc | Generates PHP comment block with @var | (var)
- PHP | Generates/surronds selection with php comment | (cmt)
- PHP | Dump variable and exit | (dd)
- PHP templates
- JavaScript templates
- Contributors
«$SELECTION$»
Typograpghy | Double-angle quotation mark
—
Typograpghy | Emdash (Long dash)
<div class="widget">
<div class="widget-content padding">
$SELECTION$
</div>
</div>
Bootstrap | Widget tags
<?= $END$ ?>
PHP | Echo php code.
<?= $END$ ?>
PHP | Echo php code.
<?= Yii::t('app', '$SELECTION$') ?>
YII2 | Translation of word via Yii:t()
<?= Url::to('$SELECTION$') ?>
YII2 | Url helper
<?= Url::to('@web/$END$') ?>
YII2 | Url helper
<?= Url::to(['$END$']) ?>
YII2 | Url helper
<?php $END$ ?>
PHP | Open php tag
<?= number_format($VAR$, 0, ',', ' ') ?>
PHP | Number Format
<?php foreach($ARRAY$ as $KEY$ => $VALUE$): ?>
$SELECTION$
<?php endforeach ?>
PHP | Generates/surrounds selection with foreach
<?php if ($CONDITION$) : ?>
$SELECTION$
<?php endif; ?>
PHP | Generates/surrounds selection with if
<?php
echo '<pre>';
var_dump($END$);
echo '</pre>';
exit();
?>
PHP | Dump variable and exit
<?php
/**
* @var $END$
*/
?>
PHPDoc | Generates PHP comment block with @var
<?php /*
$SELECTION$
*/ ?>
PHP | Generates/surronds selection with php comment
$this->registerMetaTag([
'name' => '$TAGNAME$',
'content' => $SELECTION$,
]);
Yii2 | Register Meta-tags
$transaction = Yii::$app->db->beginTransaction();
try {
$END$
$transaction->commit();
} catch (\Exception $e) {
$transaction->rollBack();
}
Yii2 | DB transaction
public function action$NAME$($PARAMETERS$)
{
return $END$;
}
Yii2 | Controller action
Yii::t('app', '$SELECTION$');
YII2 | Translation of word via Yii:t()
echo '<pre>';
var_dump($END$);
echo '</pre>';
exit();
PHP | Dump variable and exit
console.log($END$);
JavaScript | Console log
process.exit();
JavaScript | NodeJS exit