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 | |
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 | |
// 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
<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 | |
$provider_ids = Provider::find() | |
->select(['id']) | |
->where(['parent_id' => $parent_provider_id]); | |
$num_providers = $provider_ids->count(); | |
if($num_providers > 0){ | |
$arr_provider = $provider_ids |
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
gaya.info.yml: | |
name: Gaia | |
type: theme | |
description: 'A starter theme which is based on the Drupal core template files.' | |
package: Core | |
version: 8.x-1.0 | |
core: 8.x | |
libraries: | |
- gaia/global-styling |
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 | |
$dom = new \DOMDocument('1.0', 'UTF-8'); | |
// PHP will output warnings about non-standard HTML. Suppress it by "@". | |
@$dom->loadHTML($source); | |
// Iterate over all link-elements. | |
foreach ($dom->getElementsByTagName('link') as $node) { | |
// Copy the element to be able to replace it. | |
$updated_element = $node; | |
$href_value = $updated_element->getAttribute( 'href' ); |
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
<VirtualHost *:80> |