/**
* @return string User full name
*/
public function getFullName()
{
return $this->name . ' ' . $this->surname;
}
return ArrayHelper::map(self::find()->all(), 'id', 'fullName');
Вот например я пишу
html>head>title и нажимаю на таб то у меня он трансформируется в
echo \Yii::$app->params['sendPusle']['var'];
$config = [
// …
'params' => [
'sendPusle' => ['var' => 'value']
],
];
git diff
git checkout <filename>
setcookie("TestCookie", "value", time()+3600, "/", "www.example.com");
<?= Html::img("@web/images/products/{$hit->img}", ['alt' => $hit->name])?>
<?= Html::img("@web/images/products/{$hit->img}", ['alt' => $hit->name, 'style' => ['width' => '100px', 'height' => '100px'], 'class' => 'my_img'])?>
$id = 2;
$c_name = 'common\models\Article';
$obj = new $c_name();
$obj::findOne($id);
$c_name = 'common\models\Article';
$obj = Yii::createObject($c_name);
$obj::findOne($id);
$obj = Yii::createObject([
'class' => 'common\models\Article',
'some_attr' => 'алюминий',
]);
$obj::findOne($id);
trim($text);
$explodedText = explode(' ', $text);
$resText = str_replace($explodedText[0], '<b>' . $explodedText[0] . '</b>', $text);
echo $resText;