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
<script src="/assets/3598bbc6/js/YOUR-JavaScriptFile.js"></script> |
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 | |
// that class is usually used, if you work with html in your view. | |
use yii\helpers\Html; | |
// here comes your Yii2 asset's class! | |
use app\modules\YOUR-MODULE\assets\YOUR-ASSER-CLASS; | |
// now Yii puts your css and javascript files into your view's html. | |
MyModuleAsset::register($this); |
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 app\modules\MY-MODULE\assets; | |
use yii\web\AssetBundle; | |
class MyModuleAsset extends AssetBundle | |
{ | |
// the alias to your assets folder in your file system | |
public $sourcePath = '@yiipass-assets'; |
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 app\modules\MY-MODULE; | |
class Module extends \yii\base\Module | |
{ | |
public $controllerNamespace = 'app\modules\MY-MODULE\controllers'; | |
public function init() | |
{ |
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 | |
/* @var $xml app\modules\yiipass\services\xml */ | |
$xml = \Yii::$app->getModule('MY-MODULE')->get('xml'); |
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 app\modules\MY-MODULE; | |
class Module extends \yii\base\Module | |
{ | |
public $controllerNamespace = 'app\modules\MY-MODULE\controllers'; | |
public function init() | |
{ |
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 | |
defined('YII_DEBUG') or define('YII_DEBUG', true); | |
// fcgi doesn't have STDIN and STDOUT defined by default | |
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); | |
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w')); | |
require_once(__DIR__ . '/vendor/autoload.php'); | |
require_once(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); |
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 | |
use app\tests\fixtures\ModelFixtureDataCreator; | |
class MyTest extends PHPUnit_Framework_TestCase | |
{ | |
protected function setUp() | |
{ | |
require_once 'yii_booter_for_tests.php'; |
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 | |
use app\commands\ObjectExportController; | |
use app\tests\fixtures\ModelFixtureDataCreator; | |
class MyTest extends PHPUnit_Framework_TestCase | |
{ | |
protected function setUp() | |
{ | |
require_once 'yii_booter_for_tests.php'; |
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
use app\commands\ObjectExportController; | |
use app\tests\fixtures\ModelFixtureDataCreator; | |
class MyTest extends PHPUnit_Framework_TestCase | |
{ | |
protected function setUp() | |
{ | |
require_once 'yii_booter_for_tests.php'; | |
$test_classname = get_class($this); |