Options +SymlinksIfOwnerMatch
IndexIgnore */*
RewriteEngine On
# Если запрос начинается с /admin, то заменяем на /backend/web/
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin\/?(.*) /backend/web/$1
RewriteCond %{REQUEST_URI} !^/(frontend/web|backend/web|admin)
RewriteRule (.*) /frontend/web/$1
# Если frontend запрос
RewriteCond %{REQUEST_URI} ^/frontend/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /frontend/web/index.php
# Если backend запрос
RewriteCond %{REQUEST_URI} ^/backend/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /backend/web/index.php
public function getPlaceHolder(){
if($this->placeHolderPath){
return new PlaceHolder();
}else{
return null;
}
}
You can specify date and time formats using the ICU syntax. You can also use the PHP date() syntax with a prefix php: to differentiate it from ICU syntax.
<body>
<div class="page-wrapper">
<div class="page-buffer"></div>
</div>
<div class="page-footer">
</div>
</body>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.page-wrapper {
min-height: 100%;
margin-bottom: -50px;
}
* html .page-wrapper {
height: 100%;
}
.page-buffer {
height: 50px;
}
$fullarray = [.....]; //Массив с данными
$fields = ['product_id','name','group_id','manufacturer','fullname','code'];
$db = Yii::$app->db;
$sql = $db->queryBuilder->batchInsert(self::tableName(), $fields, $fullarray);
$product_insert_count = $db->createCommand($sql . ' ON DUPLICATE KEY UPDATE name = VALUES(name), group_id = VALUES(group_id), manufacturer = VALUES(manufacturer), fullname = VALUES(fullname), code = VALUES(code)')->execute();
class NavWidget extends Widget
{
public $items = [];
/**
* Renders the menu.
*/
public function run()
{
$items = $this->items;
if (!empty($items)) {
echo Html::tag('ul', $this->renderItems($items));
}
}
protected function renderItems($items)
{
$lines = [];
foreach ($items as $item) {
$menu = $this->renderItem($item);
if (!empty($item['items'])) {
$menu .= Html::tag('ul', $this->renderItems($item['items']));
}
$lines[] = Html::tag('li', $menu);
}
return implode("\n", $lines);
}
protected function renderItem($item)
{
$link = 'Тут собранная ссылка';
return $link;
}
}