<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header pull-left">
<a class="navbar-brand" href="#">WebSiteName</a>
</div>
<div class="navbar-header pull-right">
<ul class="nav navbar-nav nav-pills pull-left">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
<button data-target="#myNavbar" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Page 1-1</a></li>
<li><a href="#">Page 1-2</a></li>
<li><a href="#">Page 1-3</a></li>
</ul>
</li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3</a></li>
</ul>
</div>
</div>
</nav>
...
/* Добавим data-header="M" к .masonry-item*/
<div class="col-lg-3 col-md-3 col-sm-3 col-xl-12 masonry-item" data-header="M">
/* <li class="header">M</li> Убрать из разметки*/
...
</div>
...
.masonry-item[data-header]:before {
content: attr(data-header);
display: block;
font-weight:bold;
}
$students = Student::find()->where(['id' => $this->selectedStudents])->all();
foreach ($students as $student) {
$student->school_id = $this->id; // еще можно использовать метод link()
$student->save();
}
$xml = simplexml_load_string($xml_string);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
$user = User::find()->with('userBookmarks', 'userBookmarks.films' )->all();
public static function getItemList($cat_id)
{
return array_map(function (array $item) {
return [
'id' => $item['id'],
'name' => $item['name_en'];
];
}, NetItem::find()->where(['count_id' => $cat_id])->asArray()->all());
}
$form = ActiveForm::begin([
'id' => 'login-form',
'options' => ['class' => 'form-horizontal'],
'fieldConfig' => [
'template' => '{label}<div class="col-sm-10">{input}</div><div class="col-sm-10">{error}</div>',
'labelOptions' => ['class' => 'col-sm-2 control-label'],
],
]);
$time = '123h 5 m 07s';
if (preg_match('~(\d+)\s*h~', $time, $match)
$hours = $match[1];
if (preg_match('~(\d+)\s*m~', $time, $match)
$minutes = $match[1];
if (preg_match('~(\d+)\s*s~', $time, $match)
$seconds = $match[1];