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
/** | |
* @param $url | |
* @return string | |
* @throws \yii\base\InvalidConfigException | |
*/ | |
public static function getAssetUrl($url) | |
{ | |
$class = ArrayHelper::getValue([ | |
'app-frontend' => \frontend\assets\AppAsset::class, | |
], \Yii::$app->id); |
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 | |
/** | |
* @author Alexey Samoylov <alexey.samoylov@gmail.com> | |
*/ | |
namespace common\components; | |
use yii\data\DataProviderInterface; | |
class MapDataProvider implements DataProviderInterface | |
{ |
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
Options FollowSymLinks | |
AddDefaultCharset utf-8 | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# the main rewrite rule for the frontend application | |
RewriteCond %{REQUEST_URI} !^/(backend/web|admin) | |
RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L] |
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
ymaps.ready(init); | |
var myMap, myPlaceMark; | |
function init() { | |
myMap = new ymaps.Map("map", { | |
center: [<?=$model->latitude?>, <?=$model->longitude?>], | |
zoom: <?=$city->defaultZoom?>, | |
minZoom: <?=$city->minZoom?>, | |
maxZoom: <?=$city->maxZoom?>, | |
controls: ['searchControl', 'typeSelector', 'zoomControl', 'geolocationControl'] | |
}); |
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 static function getAssetUrl($url) | |
{ | |
return \Yii::$app->assetManager->getBundle('frontend\assets\AppAsset')->baseUrl . $url; | |
} |
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 | |
namespace common\components; | |
/** | |
* Class ActiveRecord | |
* @package common\components | |
*/ | |
class ActiveRecord extends \yii\db\ActiveRecord | |
{ | |
/** |
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 | |
namespace common\traits; | |
use yii\base\InvalidConfigException; | |
use yii\helpers\ArrayHelper; | |
/** | |
* Trait for default status column | |
* | |
* Class StatusTrait |
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
$js = <<<JS | |
// Change hash for page-reload | |
$('.nav-tabs a').on('shown.bs.tab', function (e) { | |
window.location.hash = e.target.hash; | |
}) | |
// Javascript to enable link to tab | |
var url = document.location.toString(); | |
if (url.match('#')) { | |
$('.nav-tabs a[href=#'+url.split('#')[1]+']').tab('show') ; |
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
server { | |
listen 80; | |
server_name yiidreamteam.com; | |
charset utf-8; | |
root /var/www/yiidreamteam/frontend/web; | |
location / { | |
index index.php; |
NewerOlder